mirror of
https://github.com/konvajs/konva.git
synced 2025-11-24 16:53:06 +08:00
fix: config parameter modified by toKonvaCanvas
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user