Ver código fonte

Canvas2D: fix contentArea computing bug

nockawa 8 anos atrás
pai
commit
d02e90e977

+ 1 - 1
canvas2D/src/Engine/babylon.prim2dBase.ts

@@ -3645,7 +3645,7 @@
                 }
                 }
 
 
                 if (!this._isFlagSet(SmartPropertyPrim.flagBoundingInfoDirty)) {
                 if (!this._isFlagSet(SmartPropertyPrim.flagBoundingInfoDirty)) {
-                    return this._boundingSize;
+                    return this._contentArea;
                 }
                 }
 
 
                 Prim2DBase.boundinbBoxReentrency = true;
                 Prim2DBase.boundinbBoxReentrency = true;

+ 1 - 1
canvas2D/src/Engine/babylon.primitiveCollisionManager.ts

@@ -600,7 +600,7 @@
             if (!this._debugTextBackground) {
             if (!this._debugTextBackground) {
 
 
                 this._debugTextBackground = new Rectangle2D({
                 this._debugTextBackground = new Rectangle2D({
-                    id: "###DEBUG PMC STATS###", parent: this._owner, marginAlignment: "h: left, v: top", fill: "#C0404080", padding: "top: 10, left: 10, right: 10, bottom: 10", roundRadius: 10, children: [
+                    id: "###DEBUG PMC STATS###", parent: this._owner, marginAlignment: "h: left, v: top", fill: "#C0404080", padding: "10", margin: "10", roundRadius: 10, children: [
                         new Text2D(txt, { id: "###DEBUG PMC TEXT###", fontName: "12pt Lucida Console" })
                         new Text2D(txt, { id: "###DEBUG PMC TEXT###", fontName: "12pt Lucida Console" })
                     ]
                     ]
                 });
                 });

+ 2 - 2
dist/preview release/canvas2D/babylon.canvas2d.js

@@ -2854,7 +2854,7 @@ var BABYLON;
                 (" - Intersections count: " + this.intersectedActors.count);
                 (" - Intersections count: " + this.intersectedActors.count);
             if (!this._debugTextBackground) {
             if (!this._debugTextBackground) {
                 this._debugTextBackground = new BABYLON.Rectangle2D({
                 this._debugTextBackground = new BABYLON.Rectangle2D({
-                    id: "###DEBUG PMC STATS###", parent: this._owner, marginAlignment: "h: left, v: top", fill: "#C0404080", padding: "top: 10, left: 10, right: 10, bottom: 10", roundRadius: 10, children: [
+                    id: "###DEBUG PMC STATS###", parent: this._owner, marginAlignment: "h: left, v: top", fill: "#C0404080", padding: "10", margin: "10", roundRadius: 10, children: [
                         new BABYLON.Text2D(txt, { id: "###DEBUG PMC TEXT###", fontName: "12pt Lucida Console" })
                         new BABYLON.Text2D(txt, { id: "###DEBUG PMC TEXT###", fontName: "12pt Lucida Console" })
                     ]
                     ]
                 });
                 });
@@ -7811,7 +7811,7 @@ var BABYLON;
                         return Prim2DBase_1.nullSize;
                         return Prim2DBase_1.nullSize;
                     }
                     }
                     if (!this._isFlagSet(BABYLON.SmartPropertyPrim.flagBoundingInfoDirty)) {
                     if (!this._isFlagSet(BABYLON.SmartPropertyPrim.flagBoundingInfoDirty)) {
-                        return this._boundingSize;
+                        return this._contentArea;
                     }
                     }
                     Prim2DBase_1.boundinbBoxReentrency = true;
                     Prim2DBase_1.boundinbBoxReentrency = true;
                     var b = this.boundingInfo;
                     var b = this.boundingInfo;

Diferenças do arquivo suprimidas por serem muito extensas
+ 10 - 10
dist/preview release/canvas2D/babylon.canvas2d.min.js