diff options
-rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 12 | ||||
-rw-r--r-- | src/client/views/collections/collectionSchema/SchemaRowBox.tsx | 3 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index 5f795c5ac..151e6cbef 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -884,6 +884,8 @@ export class CollectionSchemaView extends CollectionSubView() { rowHeightFunc = () => CollectionSchemaView._rowHeight; rowClickScriptFunc = () => this.rowOnClickScript; isContentActive = () => this.props.isSelected() || this.props.isContentActive(); + screenToLocal = () => this.props.ScreenToLocalTransform().translate(-this.tableWidth, 0); + previewWidthFunc = () => this.previewWidth; render() { return ( <div @@ -893,11 +895,7 @@ export class CollectionSchemaView extends CollectionSubView() { this.createDashEventsTarget(ele); }} onDrop={this.onExternalDrop.bind(this)}> - <div - className="schema-table" - style={{ - pointerEvents: this.isContentActive() ? 'all' : 'none', - }}> + <div className="schema-table"> <div className="schema-header-row" style={{ height: CollectionSchemaView._rowHeight }}> <div className="row-menu" style={{ width: CollectionSchemaView._rowMenuWidth }}> <div @@ -982,11 +980,11 @@ export class CollectionSchemaView extends CollectionSubView() { focus={DocUtils.DefaultFocus} renderDepth={this.props.renderDepth} rootSelected={this.rootSelected} - PanelWidth={() => this.previewWidth} + PanelWidth={this.previewWidthFunc} PanelHeight={this.props.PanelHeight} isContentActive={returnTrue} isDocumentActive={returnFalse} - ScreenToLocalTransform={() => this.props.ScreenToLocalTransform().translate(-this.tableWidth, 0)} + ScreenToLocalTransform={this.screenToLocal} docFilters={this.childDocFilters} docRangeFilters={this.childDocRangeFilters} searchFilterDocs={this.searchFilterDocs} diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx index aa69e2b9c..87284be70 100644 --- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx +++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx @@ -39,7 +39,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<FieldViewProps>() { @action onRowPointerDown = (e: React.PointerEvent) => { if (!this.isContentActive()) return; - setupMoveUpEvents(this, e, e => this.schemaView?.startDrag(e, this.rootDoc, this.rowIndex) ?? true, emptyFunction, emptyFunction, false); + setupMoveUpEvents(this, e, e => this.schemaView?.startDrag(e, this.rootDoc, this.rowIndex) ?? true, emptyFunction, emptyFunction); }; onPointerEnter = (e: any) => { @@ -99,6 +99,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<FieldViewProps>() { className="row-menu" style={{ width: CollectionSchemaView._rowMenuWidth, + pointerEvents: !this.isContentActive() ? 'none' : undefined, }}> <div className="schema-row-button" |