aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx8
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx5
2 files changed, 7 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index b9be3b64f..7b76a5c84 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -405,7 +405,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell {
} else {
if (bool) {
console.log("show doc");
- this.props.showDoc(this._doc, this.prop.DataDoc, e.screenX - 230, e.screenY - 570);
+ this.props.showDoc(this._doc, this.prop.DataDoc, e.clientX, e.clientY);
} else {
console.log("no doc");
this.props.showDoc(undefined);
@@ -445,11 +445,11 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell {
return (
<div className="collectionSchemaView-cellWrapper" ref={this._focusRef} tabIndex={-1}
- // onPointerDown={(e) => { this.onDown(e); }}
+ onPointerDown={(e) => { this.onDown(e); }}
// onFocus={(e) => this.showPreview(true, e)}
- onMouseEnter={(e) => { this.showPreview(true, e); }}
+ onPointerEnter={(e) => { this.showPreview(true, e); }}
// onBlur={(e) => { console.log("Blur"); this.showPreview(false, e) }}
- onMouseLeave={(e) => { this.showPreview(false, e); }}
+ onPointerLeave={(e) => { this.showPreview(false, e); }}
>
<div className="collectionSchemaView-cellContents-document"
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index 574884e86..03db0377a 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -796,8 +796,9 @@ export class SchemaTable extends React.Component<SchemaTableProps> {
{!this._showDoc ? (null) :
<div className="collectionSchemaView-documentPreview" //onClick={() => { this.onOpenClick(); }}
style={{
- position: "absolute", width: 400, height: 300,
- transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1]}px)`
+ position: "absolute", width: 150, height: 150,
+ background: "dimGray", display: "block", top: 0, left: 0,
+ transform: `translate(${this._showDocPos[0]}px, ${this._showDocPos[1] - 180}px)`
}}
ref="overlay"><ContentFittingDocumentView
Document={this._showDoc}