mirror of
https://github.com/konvajs/konva.git
synced 2025-12-21 19:27:08 +08:00
refactored stage.reset method. Now storing node default attrs as an object which can be used by the stage to reset itself
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
* @param {Object} config
|
||||
*/
|
||||
Kinetic.Node = function(config) {
|
||||
this.setDefaultAttrs({
|
||||
this.defaultNodeAttrs = {
|
||||
visible: true,
|
||||
listening: true,
|
||||
name: undefined,
|
||||
@@ -28,8 +28,9 @@ Kinetic.Node = function(config) {
|
||||
dragConstraint: 'none',
|
||||
dragBounds: {},
|
||||
draggable: false
|
||||
});
|
||||
};
|
||||
|
||||
this.setDefaultAttrs(this.defaultNodeAttrs);
|
||||
this.eventListeners = {};
|
||||
this.setAttrs(config);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user