From 5151b725c0959aeec7168125c3205c1e1962b37c Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 25 Jun 2020 00:15:32 -0500 Subject: fixed translating with menu --- src/client/views/collections/CollectionSchemaView.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index fae55b775..d7038eaa9 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -116,6 +116,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } else { this._isOpen = false; this.setHeaderIsEditing(false); + this.closeHeader(); } } @@ -358,11 +359,14 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { //anchorPoints.TOP_CENTER @computed get renderMenu() { + const scale = this.props.ScreenToLocalTransform().Scale; return (
this.props.active(true) && e.stopPropagation()} style={{ - position: "absolute", background: "white", - transform: `translate(${this.menuCoordinates[0]}px, ${this.menuCoordinates[1] - 150}px)` + position: "absolute", + background: "white", + transform: `translate(${this.menuCoordinates[0]}px, ${this.menuCoordinates[1] - 160 * scale}px)` }}> {this.renderContent(this.col)}
@@ -1026,7 +1030,8 @@ 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} > + return
this.props.active(true) && e.stopPropagation()} + onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} > {this.reactTable}
this.createRow()}>+ new
{!this._showDoc ? (null) : -- cgit v1.2.3-70-g09d2