vendor/kinetic-v5.1.0.js
function(child) {
            if (arguments.length > 1) {
                for (var i = 0; i < arguments.length; i++) {
                    this.add(arguments[i]);
                }
                return;
            }
            if (child.getParent()) {
                child.moveTo(this);
                return;
            }
            var children = this.children;
            this._validateAdd(child);
            child.index = children.length;
            child.parent = this;
            children.push(child);
            this._fire('add', {
                child: child
            });

            // chainable
            return this;
        }
function(child) {
            if (arguments.length > 1) {
                for (var i = 0; i < arguments.length; i++) {
                    this.add(arguments[i]);
                }
                return;
            }
            if (child.getParent()) {
                child.moveTo(this);
                return;
            }
            var children = this.children;
            this._validateAdd(child);
            child.index = children.length;
            child.parent = this;
            children.push(child);
            this._fire('add', {
                child: child
            });

            // chainable
            return this;
        }
function ( child ) { if ( arguments . length > 1 ) { for ( var i = 0 ; i < arguments . length ; i ++ ) { this . add ( arguments [ i ] ) ; } return ; } if ( child . getParent ( ) ) { child . moveTo ( this ) ; return ; } var children = this . children ; this . _validateAdd ( child ) ; child . index = children . length ; child . parent = this ; children . push ( child ) ; this . _fire ( 'add' , { child : child } ) ; // chainable return this ; }
Add node or nodes to container.
@method
@memberof Kinetic.Container.prototype
@param {...Kinetic.Node} child
@returns {Container}
@example
layer.add(shape1, shape2, shape3);
Add node or nodes to container .