added setDrawFunc() method to Shape so that you can dynamically change the drawing function. added new unit test

This commit is contained in:
Eric Rowell
2012-03-31 00:14:18 -07:00
parent 9994e8a37e
commit 99d9381411
4 changed files with 52 additions and 1 deletions

View File

@@ -1971,6 +1971,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

File diff suppressed because one or more lines are too long