diff options
Diffstat (limited to 'src')
3 files changed, 14 insertions, 6 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.scss b/src/client/views/collections/collectionSchema/CollectionSchemaView.scss index 769afbbf6..34e591195 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.scss +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.scss @@ -175,7 +175,7 @@ } .schema-row { - cursor: default; + cursor: grab; justify-content: flex-end; background: white; diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index 28e0b07a4..a5f5ca2ae 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -881,6 +881,10 @@ export class CollectionSchemaView extends CollectionSubView() { ); } + tableWidthFunc = () => this.tableWidth; + rowHeightFunc = () => CollectionSchemaView._rowHeight; + rowClickScriptFunc = () => this.rowOnClickScript; + isContentActive = () => this.props.isSelected() || this.props.isContentActive(); render() { return ( <div @@ -892,6 +896,9 @@ export class CollectionSchemaView extends CollectionSubView() { onDrop={this.onExternalDrop.bind(this)}> <div className="schema-table" + style={{ + pointerEvents: this.isContentActive() ? 'all' : 'none', + }} onPointerDown={action(() => { this.clearSelection(); })}> @@ -941,8 +948,8 @@ export class CollectionSchemaView extends CollectionSubView() { DataDoc={dataDoc} ContainingCollectionView={this.props.CollectionView} ContainingCollectionDoc={this.Document} - PanelWidth={() => this.tableWidth} - PanelHeight={() => CollectionSchemaView._rowHeight} + PanelWidth={this.tableWidthFunc} + PanelHeight={this.rowHeightFunc} styleProvider={DefaultStyleProvider} focus={this.focusDocument} docFilters={this.childDocFilters} @@ -951,13 +958,14 @@ export class CollectionSchemaView extends CollectionSubView() { rootSelected={this.rootSelected} ScreenToLocalTransform={Transform.Identity} bringToFront={emptyFunction} - isContentActive={this.isChildContentActive} + isDocumentActive={this.isContentActive} + isContentActive={emptyFunction} hideDecorations={true} hideTitle={true} hideDocumentButtonBar={true} hideLinkAnchors={true} fitWidth={returnTrue} - onClick={() => this.rowOnClickScript} + onClick={this.rowClickScriptFunc} scriptContext={this} /> </div> diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index f34ac2b44..d7a61a797 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -319,7 +319,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps return this.props?.styleProvider?.(this.layoutDoc, this.props, StyleProp.TitleHeight) || 0; } @computed get pointerEvents(): 'none' | 'all' | 'visiblePainted' | undefined { - return this.onClickHandler ? 'all' : this.props.styleProvider?.(this.Document, this.props, StyleProp.PointerEvents + (this.props.isSelected() ? ':selected' : '')); + return this.props.styleProvider?.(this.Document, this.props, StyleProp.PointerEvents + (this.props.isSelected() ? ':selected' : '')); } @computed get finalLayoutKey() { return StrCast(this.Document.layoutKey, 'layout'); |