vendor/kinetic-v5.1.0.js
function(pos) {
            var origTrans = this._clearTransform(),
                it;

            // don't clear translation
            this.attrs.x = origTrans.x;
            this.attrs.y = origTrans.y;
            delete origTrans.x;
            delete origTrans.y;

            // unravel transform
            it = this.getAbsoluteTransform();

            it.invert();
            it.translate(pos.x, pos.y);
            pos = {
                x: this.attrs.x + it.getTranslation().x,
                y: this.attrs.y + it.getTranslation().y
            };

            this.setPosition({x:pos.x, y:pos.y});
            this._setTransform(origTrans);

            return this;
        }
function(pos) {
            var origTrans = this._clearTransform(),
                it;

            // don't clear translation
            this.attrs.x = origTrans.x;
            this.attrs.y = origTrans.y;
            delete origTrans.x;
            delete origTrans.y;

            // unravel transform
            it = this.getAbsoluteTransform();

            it.invert();
            it.translate(pos.x, pos.y);
            pos = {
                x: this.attrs.x + it.getTranslation().x,
                y: this.attrs.y + it.getTranslation().y
            };

            this.setPosition({x:pos.x, y:pos.y});
            this._setTransform(origTrans);

            return this;
        }
function ( pos ) { var origTrans = this . _clearTransform ( ) , it ; // don't clear translation this . attrs . x = origTrans . x ; this . attrs . y = origTrans . y ; delete origTrans . x ; delete origTrans . y ; // unravel transform it = this . getAbsoluteTransform ( ) ; it . invert ( ) ; it . translate ( pos . x , pos . y ) ; pos = { x : this . attrs . x + it . getTranslation ( ) . x , y : this . attrs . y + it . getTranslation ( ) . y } ; this . setPosition ( { x : pos . x , y : pos . y } ) ; this . _setTransform ( origTrans ) ; return this ; }
set absolute position
@method
@memberof Kinetic.Node.prototype
@param {Object} pos
@param {Number} pos.x
@param {Number} pos.y
@returns {Kinetic.Node}
set absolute position