Merge pull request #412 from aniruddha-loya/master

Bug fix for getAttr(attr) function
This commit is contained in:
Eric Rowell 2013-04-24 07:28:02 -07:00
commit 5fca6b6e53

View File

@ -168,7 +168,13 @@
*/
getAttr: function(attr) {
var method = GET + Kinetic.Type._capitalize(attr);
return this[method]();
if(Kinetic.Type._isFunction(this[method])) {
return this[method]();
}
// otherwise get directly
else {
return this.attrs[attr];
}
},
/**
* get attrs