mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 16:58:33 +08:00
cleaned up getLayer fix logic
This commit is contained in:
@@ -829,11 +829,8 @@
|
|||||||
* @memberof Kinetic.Node.prototype
|
* @memberof Kinetic.Node.prototype
|
||||||
*/
|
*/
|
||||||
getLayer: function() {
|
getLayer: function() {
|
||||||
if (this.getParent()) {
|
var parent = this.getParent();
|
||||||
return this.getParent().getLayer();
|
return parent ? parent.getLayer() : null;
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* get stage ancestor
|
* get stage ancestor
|
||||||
|
|||||||
Reference in New Issue
Block a user