浏览代码

Take adaptive scaling into account.

Taton Sven 7 年之前
父节点
当前提交
66c17c30b1
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      gui/src/controls/line.ts

+ 4 - 3
gui/src/controls/line.ts

@@ -216,13 +216,14 @@ module BABYLON.GUI {
             if (end) {
                 this.x2 = x;
                 this.y2 = y;
+                this._x2.ignoreAdaptiveScaling = true;
+                this._y2.ignoreAdaptiveScaling = true;
             } else {
                 this.x1 = x;
                 this.y1 = y;
+                this._x1.ignoreAdaptiveScaling = true;
+                this._y1.ignoreAdaptiveScaling = true;
             }
-
-            this._left.ignoreAdaptiveScaling = true;
-            this._top.ignoreAdaptiveScaling = true;
         }
     }    
 }