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 CHANGED
@@ -9270,7 +9270,7 @@ class BaseElement2DShape extends CoreObject {
9270
9270
  super._updateProperty(key, value, oldValue, declaration);
9271
9271
  switch (key) {
9272
9272
  case "svg":
9273
- case "data":
9273
+ case "paths":
9274
9274
  case "viewBox":
9275
9275
  this._updatePath2DSet();
9276
9276
  this.parent.requestRedraw();
@@ -9285,7 +9285,7 @@ class BaseElement2DShape extends CoreObject {
9285
9285
  viewBox = this._path2DSet.viewBox ?? this.viewBox;
9286
9286
  } else {
9287
9287
  viewBox = this.viewBox;
9288
- this.data?.forEach((path, i) => {
9288
+ this.paths?.forEach((path, i) => {
9289
9289
  const { data, ...style } = path;
9290
9290
  const path2D = new modernPath2d.Path2D();
9291
9291
  path2D.style = style;
@@ -9333,7 +9333,7 @@ __decorateClass$p([
9333
9333
  ], BaseElement2DShape.prototype, "viewBox");
9334
9334
  __decorateClass$p([
9335
9335
  property({ default: () => [] })
9336
- ], BaseElement2DShape.prototype, "data");
9336
+ ], BaseElement2DShape.prototype, "paths");
9337
9337
 
9338
9338
  class BaseElement2DStyle extends Resource {
9339
9339
  constructor(properties) {
@@ -9524,7 +9524,7 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
9524
9524
  _process(delta) {
9525
9525
  super._process(delta);
9526
9526
  const parent = this.getParent();
9527
- if (this._parentTransformDirtyId !== parent?.globalTransform?.dirtyId) {
9527
+ if (parent?.globalTransform && this._parentTransformDirtyId !== parent?.globalTransform?.dirtyId) {
9528
9528
  this.requestRelayout();
9529
9529
  }
9530
9530
  }
package/dist/index.d.cts CHANGED
@@ -1959,7 +1959,7 @@ declare class BaseElement2DShape extends CoreObject {
1959
1959
  preset?: Required<NormalizedShape>['preset'];
1960
1960
  svg?: Required<NormalizedShape>['svg'];
1961
1961
  viewBox: Required<NormalizedShape>['viewBox'];
1962
- data: Required<NormalizedShape>['paths'];
1962
+ paths: Required<NormalizedShape>['paths'];
1963
1963
  protected _path2DSet: Path2DSet;
1964
1964
  constructor(parent: BaseElement2D);
1965
1965
  setProperties(properties?: Shape): this;
package/dist/index.d.mts CHANGED
@@ -1959,7 +1959,7 @@ declare class BaseElement2DShape extends CoreObject {
1959
1959
  preset?: Required<NormalizedShape>['preset'];
1960
1960
  svg?: Required<NormalizedShape>['svg'];
1961
1961
  viewBox: Required<NormalizedShape>['viewBox'];
1962
- data: Required<NormalizedShape>['paths'];
1962
+ paths: Required<NormalizedShape>['paths'];
1963
1963
  protected _path2DSet: Path2DSet;
1964
1964
  constructor(parent: BaseElement2D);
1965
1965
  setProperties(properties?: Shape): this;
package/dist/index.d.ts CHANGED
@@ -1959,7 +1959,7 @@ declare class BaseElement2DShape extends CoreObject {
1959
1959
  preset?: Required<NormalizedShape>['preset'];
1960
1960
  svg?: Required<NormalizedShape>['svg'];
1961
1961
  viewBox: Required<NormalizedShape>['viewBox'];
1962
- data: Required<NormalizedShape>['paths'];
1962
+ paths: Required<NormalizedShape>['paths'];
1963
1963
  protected _path2DSet: Path2DSet;
1964
1964
  constructor(parent: BaseElement2D);
1965
1965
  setProperties(properties?: Shape): this;