you can now pass in custom drawFuncs and drawHitFuncs via shape constructors

This commit is contained in:
Eric Rowell
2012-11-18 20:28:55 -08:00
parent 27d5031665
commit c121e4b941
13 changed files with 32 additions and 25 deletions

View File

@@ -27,9 +27,10 @@ Kinetic.TextPath.prototype = {
this.dataArray = [];
var that = this;
config.drawFunc = this.drawFunc;
// call super constructor
Kinetic.Shape.call(this, config);
this._setDrawFuncs();
this.dataArray = Kinetic.Path.parsePathData(this.attrs.data);
this.on('dataChange', function() {
that.dataArray = Kinetic.Path.parsePathData(this.attrs.data);