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

Fix node render
This commit is contained in:
Andrey Kernichniy 2026-03-16 01:40:02 +07:00
parent 6c2373d6ec
commit 7a95ae6ccc
6 changed files with 20 additions and 14 deletions

View file

@ -19,7 +19,7 @@ jobs:
registry-url: ${{ vars.VERDACCIO_URL }} registry-url: ${{ vars.VERDACCIO_URL }}
- name: Install dependencies - name: Install dependencies
run: npm ci --registry ${{ vars.VERDACCIO_URL }} run: npm ci --registry ${{ vars.VERDACCIO_URL }} --legacy-peer-deps
env: env:
VERDACCIO_URL: ${{ vars.VERDACCIO_URL }} VERDACCIO_URL: ${{ vars.VERDACCIO_URL }}
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}

View file

@ -21,7 +21,7 @@ jobs:
registry-url: ${{ vars.VERDACCIO_URL }} registry-url: ${{ vars.VERDACCIO_URL }}
- name: Install dependencies - name: Install dependencies
run: npm ci --registry ${{ vars.VERDACCIO_URL }} run: npm ci --registry ${{ vars.VERDACCIO_URL }} --legacy-peer-deps
env: env:
VERDACCIO_URL: ${{ vars.VERDACCIO_URL }} VERDACCIO_URL: ${{ vars.VERDACCIO_URL }}
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}

View file

@ -50,17 +50,23 @@ export class Canvas2DRenderer implements IRenderer {
} }
renderNode(drawNode: IDrawNode) { renderNode(drawNode: IDrawNode) {
this.drawNode(drawNode);
drawNode.children.forEach((leaf) => { drawNode.children.forEach((leaf) => {
if (isDrawNode(leaf)) { if (isDrawNode(leaf)) {
this._artist.setTransform(leaf.transform); this.drawNode(leaf);
this._context.save(); } else {
this.renderNode(leaf);
this._context.restore();
}
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();
}
private drawLeaf(leaf: DrawLeafs) { private drawLeaf(leaf: DrawLeafs) {
if (isEllipseDrawObject(leaf)) { if (isEllipseDrawObject(leaf)) {
this._context.save(); this._context.save();

View file

@ -1,6 +1,6 @@
{ {
"name": "@gxc-solutions/renderer-canvas-2d", "name": "@gxc-solutions/renderer-canvas-2d",
"version": "0.0.5", "version": "0.0.6",
"main": "index.js", "main": "index.js",
"author": "GXC Solutions", "author": "GXC Solutions",
"publishConfig": { "publishConfig": {
@ -8,7 +8,7 @@
"registry": "https://npm.gxc-solutions.ru" "registry": "https://npm.gxc-solutions.ru"
}, },
"peerDependencies": { "peerDependencies": {
"@gxc-solutions/math": "^0.0.3", "@gxc-solutions/math": "^0.0.4",
"@gxc-solutions/renderer-base": "^0.0.12" "@gxc-solutions/renderer-base": "^0.0.12"
} }
} }

8
package-lock.json generated
View file

@ -9,7 +9,7 @@
"version": "0.0.0", "version": "0.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@gxc-solutions/math": "^0.0.3", "@gxc-solutions/math": "^0.0.4",
"@gxc-solutions/renderer-base": "^0.0.12" "@gxc-solutions/renderer-base": "^0.0.12"
}, },
"devDependencies": { "devDependencies": {
@ -696,9 +696,9 @@
} }
}, },
"node_modules/@gxc-solutions/math": { "node_modules/@gxc-solutions/math": {
"version": "0.0.3", "version": "0.0.4",
"resolved": "https://npm.gxc-solutions.ru/@gxc-solutions/math/-/math-0.0.3.tgz", "resolved": "https://npm.gxc-solutions.ru/@gxc-solutions/math/-/math-0.0.4.tgz",
"integrity": "sha512-B39/C/3YzfSbLgsf0sBpZILTSO8TIZVbh6tv3pXulG1qDL1tg41mLjp7M263MsC7ARzj7ME8WWsniBj0C4L+XA==" "integrity": "sha512-jV7q7IR6X9R37c2zaVwsTE4H2LlRlxKLqmkmGEkMDsq6/DBbBO26VC9uu2I98tUKybYgC++jSgA5OoUF0FGg1w=="
}, },
"node_modules/@gxc-solutions/renderer-base": { "node_modules/@gxc-solutions/renderer-base": {
"version": "0.0.12", "version": "0.0.12",

View file

@ -31,7 +31,7 @@
"vite": "^7.3.1" "vite": "^7.3.1"
}, },
"dependencies": { "dependencies": {
"@gxc-solutions/math": "^0.0.3", "@gxc-solutions/math": "^0.0.4",
"@gxc-solutions/renderer-base": "^0.0.12" "@gxc-solutions/renderer-base": "^0.0.12"
} }
} }