aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionViewChromes.tsx
diff options
context:
space:
mode:
authorkimdahey <claire_kim1@brown.edu>2019-08-29 14:32:53 -0400
committerkimdahey <claire_kim1@brown.edu>2019-08-29 14:32:53 -0400
commit8e2e2c1126086cbc87432bb0466205f892d8ae98 (patch)
treed28a6721bcc392906a0ebd091c4acd11ff4747c0 /src/client/views/collections/CollectionViewChromes.tsx
parent116c17c1e4ccf189d770d170d07a6bfbf95ca4e1 (diff)
parent22a5999626b11cf75cafbcd421601e668438f6ad (diff)
fix merge conflicts
Diffstat (limited to 'src/client/views/collections/CollectionViewChromes.tsx')
-rw-r--r--src/client/views/collections/CollectionViewChromes.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionViewChromes.tsx b/src/client/views/collections/CollectionViewChromes.tsx
index b2df0e747..c897af17e 100644
--- a/src/client/views/collections/CollectionViewChromes.tsx
+++ b/src/client/views/collections/CollectionViewChromes.tsx
@@ -42,16 +42,18 @@ export class CollectionViewBaseChrome extends React.Component<CollectionViewChro
_templateCommand = {
title: "set template", script: "this.target.childLayout = this.source ? this.source[0] : undefined", params: ["target", "source"],
+ initialize: emptyFunction,
immediate: (draggedDocs: Doc[]) => this.props.CollectionView.props.Document.childLayout = draggedDocs.length ? draggedDocs[0] : undefined
};
_contentCommand = {
// title: "set content", script: "getProto(this.target).data = aliasDocs(this.source.map(async p => await p));", params: ["target", "source"], // bcz: doesn't look like we can do async stuff in scripting...
title: "set content", script: "getProto(this.target).data = aliasDocs(this.source);", params: ["target", "source"],
+ initialize: emptyFunction,
immediate: (draggedDocs: Doc[]) => Doc.GetProto(this.props.CollectionView.props.Document).data = new List<Doc>(draggedDocs.map((d: any) => Doc.MakeAlias(d)))
};
_viewCommand = {
title: "restore view", script: "this.target.panX = this.restoredPanX; this.target.panY = this.restoredPanY; this.target.scale = this.restoredScale;", params: ["target"],
- immediate: (draggedDocs: Doc[]) => { this.props.CollectionView.props.Document.panX = 0; this.props.CollectionView.props.Document.panY = 0; this.props.CollectionView.props.Document.scale = 1 },
+ immediate: (draggedDocs: Doc[]) => { this.props.CollectionView.props.Document.panX = 0; this.props.CollectionView.props.Document.panY = 0; this.props.CollectionView.props.Document.scale = 1; },
initialize: (button: Doc) => { button.restoredPanX = this.props.CollectionView.props.Document.panX; button.restoredPanY = this.props.CollectionView.props.Document.panY; button.restoredScale = this.props.CollectionView.props.Document.scale; }
};
_freeform_commands = [this._contentCommand, this._templateCommand, this._viewCommand];