diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-04-30 11:10:27 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-04-30 11:10:27 -0400 |
| commit | 0f4b9e541e4e1332bbed95f4a99113162ffef806 (patch) | |
| tree | b59258deee6dad062252eaf6e2e07e7fe82f2036 /src/client/views/collections/CollectionStackingView.tsx | |
| parent | 9adbc15b97c05bd506e3b70f57b2e6b9eb0fcfa7 (diff) | |
added double click script support
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index e3720bf01..556d7df5c 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -150,8 +150,8 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) { this.createDashEventsTarget(ele!); //so the whole grid is the drop target? } - @computed get onChildClickHandler() { return ScriptCast(this.Document.onChildClick); } - @computed get onClickHandler() { return ScriptCast(this.Document.onChildClick); } + @computed get onChildClickHandler() { return this.props.childClickScript || ScriptCast(this.Document.onChildClick); } + @computed get onChildDoubleClickHandler() { return this.props.childDoubleClickScript || ScriptCast(this.Document.onChildDoubleClick); } addDocTab = (doc: Doc, where: string) => { if (where === "inPlace" && this.layoutDoc.isInPlaceContainer) { @@ -178,7 +178,8 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) { fitToBox={BoolCast(this.props.Document._freezeChildDimensions)} rootSelected={this.rootSelected} dropAction={StrCast(this.props.Document.childDropAction) as dropActionType} - onClick={layoutDoc.isTemplateDoc ? this.onClickHandler : this.onChildClickHandler} + onClick={this.onChildClickHandler} + onDoubleClick={this.onChildDoubleClickHandler} getTransform={dxf} focus={this.props.focus} CollectionDoc={this.props.CollectionView?.props.Document} |
