mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 16:58:33 +08:00
first pass at removing setDefaultAttrs logic to speed up node instantation performance
This commit is contained in:
@@ -14,12 +14,7 @@
|
||||
|
||||
Kinetic.Ellipse.prototype = {
|
||||
_initEllipse: function(config) {
|
||||
this.setDefaultAttrs({
|
||||
radius: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
});
|
||||
this.createAttrs();
|
||||
|
||||
// call super constructor
|
||||
Kinetic.Shape.call(this, config);
|
||||
@@ -60,7 +55,7 @@
|
||||
Kinetic.Global.extend(Kinetic.Ellipse, Kinetic.Shape);
|
||||
|
||||
// add getters setters
|
||||
Kinetic.Node.addPointGettersSetters(Kinetic.Ellipse, ['radius']);
|
||||
Kinetic.Node.addPointGetterSetter(Kinetic.Ellipse, 'radius', {x:0,y:0});
|
||||
|
||||
/**
|
||||
* set radius
|
||||
|
||||
Reference in New Issue
Block a user