From 2e41227b586e6ad7f9f9f83154011ea33b27b38c Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Sun, 21 Jun 2020 22:07:01 -0400 Subject: fixed actions --- .../views/collections/CollectionSchemaView.tsx | 61 ++++++++++------------ 1 file changed, 29 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 334897028..a79b790f5 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -770,7 +770,7 @@ export class SchemaTable extends React.Component { return false; } - + @action showDoc(doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) { this._showDoc = doc; if (dataDoc && screenX && screenY) { @@ -778,7 +778,6 @@ export class SchemaTable extends React.Component { } } - @action onOpenClick = () => { if (this._showDoc) { this.props.addDocTab(this._showDoc, "onRight"); @@ -790,38 +789,36 @@ export class SchemaTable extends React.Component { } render() { - const preview = ""; - return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > - {this._showDoc ?
{ this.onOpenClick(); }} style={{ - position: "absolute", transform: `translate(${this._showDocPos[0]}, ${this._showDocPos[1]})` - }} - ref="overlay"> false} - PanelWidth={() => 150} - PanelHeight={() => 150} - ScreenToLocalTransform={this.getPreviewTransform} - docFilters={returnEmptyFilter} - ContainingCollectionDoc={this.props.CollectionView?.props.Document} - ContainingCollectionView={this.props.CollectionView} - moveDocument={this.props.moveDocument} - parentActive={this.props.active} - whenActiveChanged={emptyFunction} - addDocTab={this.props.addDocTab} - pinToPres={this.props.pinToPres} - bringToFront={returnFalse} - ContentScaling={returnOne}> -
: null} + {!this._showDoc ? (null) : +
{ this.onOpenClick(); }} style={{ position: "absolute", transform: `translate(${this._showDocPos[0]}, ${this._showDocPos[1]})` }} + ref="overlay"> false} + PanelWidth={() => 150} + PanelHeight={() => 150} + ScreenToLocalTransform={this.getPreviewTransform} + docFilters={returnEmptyFilter} + ContainingCollectionDoc={this.props.CollectionView?.props.Document} + ContainingCollectionView={this.props.CollectionView} + moveDocument={this.props.moveDocument} + parentActive={this.props.active} + whenActiveChanged={emptyFunction} + addDocTab={this.props.addDocTab} + pinToPres={this.props.pinToPres} + bringToFront={returnFalse} + ContentScaling={returnOne}> + +
} {this.reactTable}
this.createRow()}>+ new
; -- cgit v1.2.3-70-g09d2