aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-06-21 22:45:53 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-06-21 22:45:53 -0400
commite2621ee4e1e1094306f02a5f8db7a80c9c5b1d39 (patch)
tree4e1d50b781329bd8141988ecfd8596f7b2f0e09f /src
parent2e41227b586e6ad7f9f9f83154011ea33b27b38c (diff)
fixed schema preview doc bug.
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx5
1 files changed, 3 insertions, 2 deletions
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<SchemaTableProps> {
}
@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<SchemaTableProps> {
const preview = "";
return <div className="collectionSchemaView-table" onPointerDown={this.onPointerDown} onWheel={e => this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} >
{!this._showDoc ? (null) :
- <div onClick={() => { this.onOpenClick(); }} style={{ position: "absolute", transform: `translate(${this._showDocPos[0]}, ${this._showDocPos[1]})` }}
+ <div onClick={() => { this.onOpenClick(); }}
+ style={{ position: "absolute", width: 400, height: 300, transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1]}px)` }}
ref="overlay"><ContentFittingDocumentView
Document={this._showDoc}
DataDoc={this._showDataDoc}