modern-canvas 0.4.46 → 0.4.48
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.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9264,7 +9264,7 @@ class BaseElement2DShape extends CoreObject {
|
|
|
9264
9264
|
super._updateProperty(key, value, oldValue, declaration);
|
|
9265
9265
|
switch (key) {
|
|
9266
9266
|
case "svg":
|
|
9267
|
-
case "
|
|
9267
|
+
case "paths":
|
|
9268
9268
|
case "viewBox":
|
|
9269
9269
|
this._updatePath2DSet();
|
|
9270
9270
|
this.parent.requestRedraw();
|
|
@@ -9279,7 +9279,7 @@ class BaseElement2DShape extends CoreObject {
|
|
|
9279
9279
|
viewBox = this._path2DSet.viewBox ?? this.viewBox;
|
|
9280
9280
|
} else {
|
|
9281
9281
|
viewBox = this.viewBox;
|
|
9282
|
-
this.
|
|
9282
|
+
this.paths?.forEach((path, i) => {
|
|
9283
9283
|
const { data, ...style } = path;
|
|
9284
9284
|
const path2D = new Path2D();
|
|
9285
9285
|
path2D.style = style;
|
|
@@ -9327,7 +9327,7 @@ __decorateClass$p([
|
|
|
9327
9327
|
], BaseElement2DShape.prototype, "viewBox");
|
|
9328
9328
|
__decorateClass$p([
|
|
9329
9329
|
property({ default: () => [] })
|
|
9330
|
-
], BaseElement2DShape.prototype, "
|
|
9330
|
+
], BaseElement2DShape.prototype, "paths");
|
|
9331
9331
|
|
|
9332
9332
|
class BaseElement2DStyle extends Resource {
|
|
9333
9333
|
constructor(properties) {
|
|
@@ -9518,7 +9518,7 @@ let Node2D = class extends CanvasItem {
|
|
|
9518
9518
|
_process(delta) {
|
|
9519
9519
|
super._process(delta);
|
|
9520
9520
|
const parent = this.getParent();
|
|
9521
|
-
if (this._parentTransformDirtyId !== parent?.globalTransform?.dirtyId) {
|
|
9521
|
+
if (parent?.globalTransform && this._parentTransformDirtyId !== parent?.globalTransform?.dirtyId) {
|
|
9522
9522
|
this.requestRelayout();
|
|
9523
9523
|
}
|
|
9524
9524
|
}
|