Merge pull request #1970 from crazyurus/master
Some checks failed
Test Browser / build (20.x) (push) Has been cancelled
Test NodeJS / build (23.x) (push) Has been cancelled

Fix config parameter modified by toKonvaCanvas
This commit is contained in:
Anton Lavrenov
2025-09-05 14:54:11 -05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -228,7 +228,7 @@ export class Layer extends Container<Group | Shape> {
}
}
_toKonvaCanvas(config) {
config = config || {};
config = { ...config };
config.width = config.width || this.getWidth();
config.height = config.height || this.getHeight();
config.x = config.x !== undefined ? config.x : this.x();

View File

@@ -316,7 +316,7 @@ export class Stage extends Container<Layer> {
return this.content;
}
_toKonvaCanvas(config) {
config = config || {};
config = { ...config };
config.x = config.x || 0;
config.y = config.y || 0;