mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 16:58:33 +08:00
fixed up Ring shape init method because the drawFunc API slightly changed
This commit is contained in:
@@ -32,8 +32,9 @@
|
||||
// call super constructor
|
||||
Kinetic.Shape.call(this, config);
|
||||
this.className = 'Ring';
|
||||
this.setDrawFunc(this._drawFunc);
|
||||
},
|
||||
drawFunc: function(context) {
|
||||
_drawFunc: function(context) {
|
||||
context.beginPath();
|
||||
context.arc(0, 0, this.getInnerRadius(), 0, PIx2, false);
|
||||
context.moveTo(this.getOuterRadius(), 0);
|
||||
|
||||
@@ -11,7 +11,8 @@ suite('Ring', function() {
|
||||
outerRadius: 90,
|
||||
fill: 'green',
|
||||
stroke: 'black',
|
||||
strokeWidth: 4
|
||||
strokeWidth: 4,
|
||||
draggable: true
|
||||
});
|
||||
layer.add(ring);
|
||||
stage.add(layer);
|
||||
|
||||
Reference in New Issue
Block a user