mirror of
https://github.com/konvajs/konva.git
synced 2025-12-05 03:24:23 +08:00
added setDrawFunc() method to Shape so that you can dynamically change the drawing function. added new unit test
This commit is contained in:
@@ -133,6 +133,13 @@ Kinetic.Shape.prototype = {
|
||||
getStrokeWidth: function() {
|
||||
return this.strokeWidth;
|
||||
},
|
||||
/**
|
||||
* set draw function
|
||||
* @param {Function} func drawing function
|
||||
*/
|
||||
setDrawFunc: function(func) {
|
||||
this.drawFunc = func;
|
||||
},
|
||||
/**
|
||||
* draw shape
|
||||
* @param {Layer} layer Layer that the shape will be drawn on
|
||||
|
||||
Reference in New Issue
Block a user