Browse Source

Canvas2D: remove warning when using trackedNode

nockawa 8 years ago
parent
commit
2a807f6146
1 changed files with 4 additions and 2 deletions
  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;
         }