vendor/kinetic-v5.1.0.js
function(node) {
            var parent = node.getParent();
            while(parent) {
                if(parent._id === this._id) {
                    return true;
                }
                parent = parent.getParent();
            }

            return false;
        }
function(node) {
            var parent = node.getParent();
            while(parent) {
                if(parent._id === this._id) {
                    return true;
                }
                parent = parent.getParent();
            }

            return false;
        }
function ( node ) { var parent = node . getParent ( ) ; while ( parent ) { if ( parent . _id === this . _id ) { return true ; } parent = parent . getParent ( ) ; } return false ; }
determine if node is an ancestor
of descendant
@method
@memberof Kinetic.Container.prototype
@param {Kinetic.Node} node
determine if node is an ancestor of descendant