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 +10 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +31 -31
- package/dist/index.mjs +10 -5
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -5996,14 +5996,14 @@ let Node = class extends CoreObject {
|
|
|
5996
5996
|
remove() {
|
|
5997
5997
|
this._parent?.removeChild(this);
|
|
5998
5998
|
}
|
|
5999
|
-
|
|
6000
|
-
this.getChildren().forEach(
|
|
5999
|
+
forEachChild(callbackfn) {
|
|
6000
|
+
this.getChildren().forEach(callbackfn);
|
|
6001
6001
|
return this;
|
|
6002
6002
|
}
|
|
6003
|
-
|
|
6003
|
+
forEachDescendant(callbackfn) {
|
|
6004
6004
|
this.getChildren().forEach((child) => {
|
|
6005
|
-
|
|
6006
|
-
child.
|
|
6005
|
+
callbackfn(child);
|
|
6006
|
+
child.forEachDescendant(callbackfn);
|
|
6007
6007
|
});
|
|
6008
6008
|
return this;
|
|
6009
6009
|
}
|
|
@@ -7306,6 +7306,11 @@ let CanvasItem = class extends TimelineNode {
|
|
|
7306
7306
|
requestRelayout() {
|
|
7307
7307
|
this._relayouting = true;
|
|
7308
7308
|
this.requestUpdate();
|
|
7309
|
+
this.forEachChild((node) => {
|
|
7310
|
+
if (node instanceof CanvasItem) {
|
|
7311
|
+
node.requestRelayout();
|
|
7312
|
+
}
|
|
7313
|
+
});
|
|
7309
7314
|
}
|
|
7310
7315
|
requestRepaint() {
|
|
7311
7316
|
this._repainting = true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modern-canvas",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.32",
|
|
5
5
|
"packageManager": "pnpm@9.15.1",
|
|
6
6
|
"description": "A JavaScript WebGL rendering engine.",
|
|
7
7
|
"author": "wxm",
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"colord": "^2.9.3",
|
|
71
71
|
"earcut": "^3.0.1",
|
|
72
72
|
"modern-font": "^0.4.1",
|
|
73
|
-
"modern-idoc": "^0.
|
|
73
|
+
"modern-idoc": "^0.4.0",
|
|
74
74
|
"modern-path2d": "^1.2.18",
|
|
75
|
-
"modern-text": "^1.3.
|
|
75
|
+
"modern-text": "^1.3.5",
|
|
76
76
|
"yoga-layout": "^3.2.1"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@antfu/eslint-config": "^4.
|
|
79
|
+
"@antfu/eslint-config": "^4.12.0",
|
|
80
80
|
"@types/earcut": "^3.0.0",
|
|
81
81
|
"@types/node": "^22.14.0",
|
|
82
82
|
"bumpp": "^10.1.0",
|