mirror of
https://github.com/konvajs/konva.git
synced 2025-04-24 19:03:56 +08:00
Merge pull request #412 from aniruddha-loya/master
Bug fix for getAttr(attr) function
This commit is contained in:
commit
5fca6b6e53
@ -168,7 +168,13 @@
|
|||||||
*/
|
*/
|
||||||
getAttr: function(attr) {
|
getAttr: function(attr) {
|
||||||
var method = GET + Kinetic.Type._capitalize(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
|
* get attrs
|
||||||
|
Loading…
Reference in New Issue
Block a user