fix: config parameter modified by toKonvaCanvas

This commit is contained in:
Crazy Urus
2025-09-05 18:04:26 +08:00
committed by Cr4zy Uru5
parent 1721ced50f
commit c7a9078911
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;