modern-canvas 0.4.30 → 0.4.32

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
@@ -6002,14 +6002,14 @@ exports.Node = class Node extends CoreObject {
6002
6002
  remove() {
6003
6003
  this._parent?.removeChild(this);
6004
6004
  }
6005
- forEach(fn) {
6006
- this.getChildren().forEach(fn);
6005
+ forEachChild(callbackfn) {
6006
+ this.getChildren().forEach(callbackfn);
6007
6007
  return this;
6008
6008
  }
6009
- deepForEach(fn) {
6009
+ forEachDescendant(callbackfn) {
6010
6010
  this.getChildren().forEach((child) => {
6011
- fn(child);
6012
- child.deepForEach(fn);
6011
+ callbackfn(child);
6012
+ child.forEachDescendant(callbackfn);
6013
6013
  });
6014
6014
  return this;
6015
6015
  }
@@ -7312,6 +7312,11 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
7312
7312
  requestRelayout() {
7313
7313
  this._relayouting = true;
7314
7314
  this.requestUpdate();
7315
+ this.forEachChild((node) => {
7316
+ if (node instanceof exports.CanvasItem) {
7317
+ node.requestRelayout();
7318
+ }
7319
+ });
7315
7320
  }
7316
7321
  requestRepaint() {
7317
7322
  this._repainting = true;
package/dist/index.d.cts CHANGED
@@ -1688,8 +1688,8 @@ declare class Node extends CoreObject {
1688
1688
  removeChild<T extends Node>(child: T): T;
1689
1689
  removeChildren(): void;
1690
1690
  remove(): void;
1691
- forEach(fn: (child: Node) => void): this;
1692
- deepForEach(fn: (descendant: Node) => void): this;
1691
+ forEachChild(callbackfn: (value: Node, index: number, array: Node[]) => void): this;
1692
+ forEachDescendant(callbackfn: (descendant: Node) => void): this;
1693
1693
  /** override */
1694
1694
  protected _ready(): void;
1695
1695
  protected _treeEnter(tree: SceneTree): void;
package/dist/index.d.mts CHANGED
@@ -1688,8 +1688,8 @@ declare class Node extends CoreObject {
1688
1688
  removeChild<T extends Node>(child: T): T;
1689
1689
  removeChildren(): void;
1690
1690
  remove(): void;
1691
- forEach(fn: (child: Node) => void): this;
1692
- deepForEach(fn: (descendant: Node) => void): this;
1691
+ forEachChild(callbackfn: (value: Node, index: number, array: Node[]) => void): this;
1692
+ forEachDescendant(callbackfn: (descendant: Node) => void): this;
1693
1693
  /** override */
1694
1694
  protected _ready(): void;
1695
1695
  protected _treeEnter(tree: SceneTree): void;
package/dist/index.d.ts CHANGED
@@ -1688,8 +1688,8 @@ declare class Node extends CoreObject {
1688
1688
  removeChild<T extends Node>(child: T): T;
1689
1689
  removeChildren(): void;
1690
1690
  remove(): void;
1691
- forEach(fn: (child: Node) => void): this;
1692
- deepForEach(fn: (descendant: Node) => void): this;
1691
+ forEachChild(callbackfn: (value: Node, index: number, array: Node[]) => void): this;
1692
+ forEachDescendant(callbackfn: (descendant: Node) => void): this;
1693
1693
  /** override */
1694
1694
  protected _ready(): void;
1695
1695
  protected _treeEnter(tree: SceneTree): void;