From e2621ee4e1e1094306f02a5f8db7a80c9c5b1d39 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Sun, 21 Jun 2020 22:45:53 -0400 Subject: fixed schema preview doc bug. --- src/client/views/collections/CollectionSchemaView.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index a79b790f5..196ebbdc6 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -771,7 +771,7 @@ export class SchemaTable extends React.Component { } @action - showDoc(doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) { + showDoc = (doc: Doc | undefined, dataDoc?: Doc, screenX?: number, screenY?: number) => { this._showDoc = doc; if (dataDoc && screenX && screenY) { this._showDocPos = this.props.ScreenToLocalTransform().transformPoint(screenX, screenY); @@ -792,7 +792,8 @@ export class SchemaTable extends React.Component { const preview = ""; return
this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > {!this._showDoc ? (null) : -
{ this.onOpenClick(); }} style={{ position: "absolute", transform: `translate(${this._showDocPos[0]}, ${this._showDocPos[1]})` }} +
{ this.onOpenClick(); }} + style={{ position: "absolute", width: 400, height: 300, transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1]}px)` }} ref="overlay">