From 5151b725c0959aeec7168125c3205c1e1962b37c Mon Sep 17 00:00:00 2001
From: anika-ahluwalia <anika.ahluwalia@gmail.com>
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/client/views/collections/CollectionSchemaView.tsx')

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 (
             <div className="collectionSchema-header-menu" ref={this.setNode}
+                onWheel={e => 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)}
             </div>
@@ -1026,7 +1030,8 @@ export class SchemaTable extends React.Component<SchemaTableProps> {
 
     render() {
         const preview = "";
-        return <div className="collectionSchemaView-table" onPointerDown={this.props.onPointerDown} onWheel={e => this.props.active(true) && e.stopPropagation()} onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} >
+        return <div className="collectionSchemaView-table" onPointerDown={this.props.onPointerDown} onWheel={e => this.props.active(true) && e.stopPropagation()}
+            onDrop={e => this.props.onDrop(e, {})} onContextMenu={this.onContextMenu} >
             {this.reactTable}
             <div className="collectionSchemaView-addRow" onClick={() => this.createRow()}>+ new</div>
             {!this._showDoc ? (null) :
-- 
cgit v1.2.3-70-g09d2

