Explorar o código

Implement marginTop offset

Lucas de Souza %!s(int64=5) %!d(string=hai) anos
pai
achega
7884cbdf28
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      js/io/domConsole.js

+ 10 - 0
js/io/domConsole.js

@@ -197,13 +197,23 @@ export class DOMConsole {
 
   focus () {
     this.termDiv.style.display = 'block';
+    // Is in draggable mode?
+    console.log(this.parent.style.top.length);
+    if(this.parent.style.top.length == 0) {
+      this.parent.style.marginTop = "-160px";
+    }
     const prev = this.inputDiv.closest('div');
     if(prev != null)
       prev.scrollIntoView();
   }
 
   hide () {
+    // Is in draggable mode?
+    if(this.parent.style.top.length == 0) {
+      this.parent.style.marginTop = "0";
+    }
     this.termDiv.style.display = 'none';
+    
   }
 
   getClassForType (type) {