dist/garnish.js
function() {
            // Has the mouse moved?
            if (this.mouseX !== this.lastMouseX || this.mouseY !== this.lastMouseY) {
                // Get the new target helper positions
                for (this._updateHelperPos._i = 0; this._updateHelperPos._i < this.helpers.length; this._updateHelperPos._i++) {
                    this.helperTargets[this._updateHelperPos._i] = this._getHelperTarget(this._updateHelperPos._i);
                }

                this.lastMouseX = this.mouseX;
                this.lastMouseY = this.mouseY;
            }

            // Gravitate helpers toward their target positions
            for (this._updateHelperPos._j = 0; this._updateHelperPos._j < this.helpers.length; this._updateHelperPos._j++) {
                this._updateHelperPos._lag = this.settings.helperLagBase + (this.helperLagIncrement * this._updateHelperPos._j);

                this.helperPositions[this._updateHelperPos._j] = {
                    left: this.helperPositions[this._updateHelperPos._j].left + ((this.helperTargets[this._updateHelperPos._j].left - this.helperPositions[this._updateHelperPos._j].left) / this._updateHelperPos._lag),
                    top: this.helperPositions[this._updateHelperPos._j].top + ((this.helperTargets[this._updateHelperPos._j].top - this.helperPositions[this._updateHelperPos._j].top) / this._updateHelperPos._lag)
                };

                this.helpers[this._updateHelperPos._j].css(this.helperPositions[this._updateHelperPos._j]);
            }

            // Let's do this again on the next frame!
            this.updateHelperPosFrame = Garnish.requestAnimationFrame(this.updateHelperPosProxy);
        }
function() {
            // Has the mouse moved?
            if (this.mouseX !== this.lastMouseX || this.mouseY !== this.lastMouseY) {
                // Get the new target helper positions
                for (this._updateHelperPos._i = 0; this._updateHelperPos._i < this.helpers.length; this._updateHelperPos._i++) {
                    this.helperTargets[this._updateHelperPos._i] = this._getHelperTarget(this._updateHelperPos._i);
                }

                this.lastMouseX = this.mouseX;
                this.lastMouseY = this.mouseY;
            }

            // Gravitate helpers toward their target positions
            for (this._updateHelperPos._j = 0; this._updateHelperPos._j < this.helpers.length; this._updateHelperPos._j++) {
                this._updateHelperPos._lag = this.settings.helperLagBase + (this.helperLagIncrement * this._updateHelperPos._j);

                this.helperPositions[this._updateHelperPos._j] = {
                    left: this.helperPositions[this._updateHelperPos._j].left + ((this.helperTargets[this._updateHelperPos._j].left - this.helperPositions[this._updateHelperPos._j].left) / this._updateHelperPos._lag),
                    top: this.helperPositions[this._updateHelperPos._j].top + ((this.helperTargets[this._updateHelperPos._j].top - this.helperPositions[this._updateHelperPos._j].top) / this._updateHelperPos._lag)
                };

                this.helpers[this._updateHelperPos._j].css(this.helperPositions[this._updateHelperPos._j]);
            }

            // Let's do this again on the next frame!
            this.updateHelperPosFrame = Garnish.requestAnimationFrame(this.updateHelperPosProxy);
        }
function ( ) { // Has the mouse moved? if ( this . mouseX !== this . lastMouseX || this . mouseY !== this . lastMouseY ) { // Get the new target helper positions for ( this . _updateHelperPos . _i = 0 ; this . _updateHelperPos . _i < this . helpers . length ; this . _updateHelperPos . _i ++ ) { this . helperTargets [ this . _updateHelperPos . _i ] = this . _getHelperTarget ( this . _updateHelperPos . _i ) ; } this . lastMouseX = this . mouseX ; this . lastMouseY = this . mouseY ; } // Gravitate helpers toward their target positions for ( this . _updateHelperPos . _j = 0 ; this . _updateHelperPos . _j < this . helpers . length ; this . _updateHelperPos . _j ++ ) { this . _updateHelperPos . _lag = this . settings . helperLagBase + ( this . helperLagIncrement * this . _updateHelperPos . _j ) ; this . helperPositions [ this . _updateHelperPos . _j ] = { left : this . helperPositions [ this . _updateHelperPos . _j ] . left + ( ( this . helperTargets [ this . _updateHelperPos . _j ] . left - this . helperPositions [ this . _updateHelperPos . _j ] . left ) / this . _updateHelperPos . _lag ) , top : this . helperPositions [ this . _updateHelperPos . _j ] . top + ( ( this . helperTargets [ this . _updateHelperPos . _j ] . top - this . helperPositions [ this . _updateHelperPos . _j ] . top ) / this . _updateHelperPos . _lag ) } ; this . helpers [ this . _updateHelperPos . _j ] . css ( this . helperPositions [ this . _updateHelperPos . _j ] ) ; } // Let's do this again on the next frame! this . updateHelperPosFrame = Garnish . requestAnimationFrame ( this . updateHelperPosProxy ) ; }
Update Helper Position
Update Helper Position