Release package version 0.0.7
All checks were successful
CI / build (push) Successful in 21s

Fix render node
This commit is contained in:
Andrey Kernichniy 2026-03-16 01:47:49 +07:00
parent 7a95ae6ccc
commit 54b153bd6e
2 changed files with 4 additions and 9 deletions

View file

@ -50,20 +50,15 @@ export class Canvas2DRenderer implements IRenderer {
} }
renderNode(drawNode: IDrawNode) { renderNode(drawNode: IDrawNode) {
this.drawNode(drawNode); this._artist.setTransform(drawNode.transform);
this._context.save();
drawNode.children.forEach((leaf) => { drawNode.children.forEach((leaf) => {
if (isDrawNode(leaf)) { if (isDrawNode(leaf)) {
this.drawNode(leaf); this.renderNode(leaf);
} else { } else {
this.drawLeaf(leaf as DrawLeafs); this.drawLeaf(leaf as DrawLeafs);
} }
}); });
}
private drawNode(node: IDrawNode) {
this._artist.setTransform(node.transform);
this._context.save();
this.renderNode(node);
this._context.restore(); this._context.restore();
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "@gxc-solutions/renderer-canvas-2d", "name": "@gxc-solutions/renderer-canvas-2d",
"version": "0.0.6", "version": "0.0.7",
"main": "index.js", "main": "index.js",
"author": "GXC Solutions", "author": "GXC Solutions",
"publishConfig": { "publishConfig": {