src/tiledimage.js
function(position, immediately) {
        var sameTarget = (this._xSpring.target.value === position.x &&
            this._ySpring.target.value === position.y);

        if (immediately) {
            if (sameTarget && this._xSpring.current.value === position.x &&
                    this._ySpring.current.value === position.y) {
                return;
            }

            this._xSpring.resetTo(position.x);
            this._ySpring.resetTo(position.y);
            this._needsDraw = true;
        } else {
            if (sameTarget) {
                return;
            }

            this._xSpring.springTo(position.x);
            this._ySpring.springTo(position.y);
            this._needsDraw = true;
        }

        if (!sameTarget) {
            this._raiseBoundsChange();
        }
    }
function(position, immediately) {
        var sameTarget = (this._xSpring.target.value === position.x &&
            this._ySpring.target.value === position.y);

        if (immediately) {
            if (sameTarget && this._xSpring.current.value === position.x &&
                    this._ySpring.current.value === position.y) {
                return;
            }

            this._xSpring.resetTo(position.x);
            this._ySpring.resetTo(position.y);
            this._needsDraw = true;
        } else {
            if (sameTarget) {
                return;
            }

            this._xSpring.springTo(position.x);
            this._ySpring.springTo(position.y);
            this._needsDraw = true;
        }

        if (!sameTarget) {
            this._raiseBoundsChange();
        }
    }
function ( position , immediately ) { var sameTarget = ( this . _xSpring . target . value === position . x && this . _ySpring . target . value === position . y ) ; if ( immediately ) { if ( sameTarget && this . _xSpring . current . value === position . x && this . _ySpring . current . value === position . y ) { return ; } this . _xSpring . resetTo ( position . x ) ; this . _ySpring . resetTo ( position . y ) ; this . _needsDraw = true ; } else { if ( sameTarget ) { return ; } this . _xSpring . springTo ( position . x ) ; this . _ySpring . springTo ( position . y ) ; this . _needsDraw = true ; } if ( ! sameTarget ) { this . _raiseBoundsChange ( ) ; } }
Sets the TiledImage's position in the world.
@param {OpenSeadragon.Point} position - The new position, in viewport coordinates.
@param {Boolean} [immediately=false] - Whether to animate to the new position or snap immediately.
@fires OpenSeadragon.TiledImage.event:bounds-change
Sets the TiledImage s position in the world .