mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
cleaned up isAncestorOf logic. stage should not be an ancestor of self. plus this was bad OO design
This commit is contained in:
parent
2b99a88b7e
commit
b757342b11
4
dist/kinetic-core.js
vendored
4
dist/kinetic-core.js
vendored
@ -2586,10 +2586,6 @@ Kinetic.Container.prototype = {
|
||||
* @param {Kinetic.Node} node
|
||||
*/
|
||||
isAncestorOf: function(node) {
|
||||
if(this.nodeType === 'Stage') {
|
||||
return true;
|
||||
}
|
||||
|
||||
var parent = node.getParent();
|
||||
while(parent) {
|
||||
if(parent._id === this._id) {
|
||||
|
6
dist/kinetic-core.min.js
vendored
6
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -198,10 +198,6 @@ Kinetic.Container.prototype = {
|
||||
* @param {Kinetic.Node} node
|
||||
*/
|
||||
isAncestorOf: function(node) {
|
||||
if(this.nodeType === 'Stage') {
|
||||
return true;
|
||||
}
|
||||
|
||||
var parent = node.getParent();
|
||||
while(parent) {
|
||||
if(parent._id === this._id) {
|
||||
|
Loading…
Reference in New Issue
Block a user