Преглед на файлове

Canvas2D: remove warning when using trackedNode

nockawa преди 8 години
родител
ревизия
2a807f6146
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      canvas2D/src/Engine/babylon.prim2dBase.ts

+ 4 - 2
canvas2D/src/Engine/babylon.prim2dBase.ts

@@ -3631,8 +3631,10 @@
                 return false;
             }
             if (this._isFlagSet(SmartPropertyPrim.flagUsePositioning)) {
-                console.log(`You can't set the position/x/y of ${this.id} properties while positioning engine is used (margin, margin alignment and/or padding are set`);
-                return false;
+                if (<any>this instanceof Group2D && (<Group2D><any>this).trackedNode == null) {
+                    console.log(`You can't set the position/x/y of ${this.id} properties while positioning engine is used (margin, margin alignment and/or padding are set`);
+                    return false;
+                }
             }
             return true;
         }