modern-canvas 0.27.0 → 0.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7954,8 +7954,8 @@ var Z = {
|
|
|
7954
7954
|
update() {
|
|
7955
7955
|
let e = this._parent, t = this.node;
|
|
7956
7956
|
if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, ua.ltr), t.hasNewLayout())) {
|
|
7957
|
-
let { left: n, top: r, width: i, height: a } = t.getComputedLayout();
|
|
7958
|
-
(!Number.isNaN(
|
|
7957
|
+
let { left: n, top: r, width: i, height: a } = t.getComputedLayout(), o = e.getParent()?.globalDisplay === "flex", s = o ? n : Number(e.style.left) || 0, c = o ? r : Number(e.style.top) || 0;
|
|
7958
|
+
(!Number.isNaN(s) && s !== e.position.x || !Number.isNaN(c) && c !== e.position.y) && e.position.set(s, c), (!Number.isNaN(i) && i !== e.size.x || !Number.isNaN(a) && a !== e.size.y) && e.size.set(i, a), t.markLayoutSeen();
|
|
7959
7959
|
}
|
|
7960
7960
|
}
|
|
7961
7961
|
destroy() {
|
|
@@ -8366,8 +8366,11 @@ var Da = class extends Gr {
|
|
|
8366
8366
|
return new Ot(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.rotation);
|
|
8367
8367
|
}
|
|
8368
8368
|
getGlobalObb() {
|
|
8369
|
-
let e = this.pivot, t = this.globalTransform.apply(e).sub(e);
|
|
8370
|
-
return new Ot(this._getPointArray().map((
|
|
8369
|
+
let e = this.pivot, t = this.globalScale, n = this.globalTransform.apply(e).sub(e);
|
|
8370
|
+
return new Ot(this._getPointArray().map((r) => ({
|
|
8371
|
+
x: e.x + (r.x - e.x) * t.x + n.x,
|
|
8372
|
+
y: e.y + (r.y - e.y) * t.y + n.y
|
|
8373
|
+
})), this.globalRotation);
|
|
8371
8374
|
}
|
|
8372
8375
|
_draw() {
|
|
8373
8376
|
super._draw(), this._background.isValid() && (this._shape.draw(!this._background.fillWithShape), this._background.draw()), this._fill.isValid() && (this._shape.draw(), this._fill.draw()), this._outline.isValid() && (this._shape.draw(), this._outline.draw()), this._foreground.isValid() && (this._shape.draw(!this._foreground.fillWithShape), this._foreground.draw()), this._text.isValid() && this._text.draw(), this._chart.isValid() && this._chart.draw(), this._drawContent();
|