End a fake drag of the pager.

@see #beginFakeDrag()
@see #fakeDragBy(float)
489268
public void endFakeDrag() {
        if (!mFakeDragging) {
            throw new IllegalStateException("No fake drag in progress. Call beginFakeDrag first.");
        }

        final VelocityTracker velocityTracker = mVelocityTracker;
        velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
        int initialVelocity = (int) VelocityTrackerCompat.getXVelocity(
                velocityTracker, mActivePointerId);
        mPopulatePending = true;
        final int width = getClientWidth();
        final int scrollX = getScrollX();
        final ItemInfo ii = infoForCurrentScrollPosition();
        final int currentPage = ii.position;
        final float pageOffset = (((float) scrollX / width) - ii.offset) / ii.widthFactor;
        final int totalDelta = (int) (mLastMotionX - mInitialMotionX);
        int nextPage = determineTargetPage(currentPage, pageOffset, initialVelocity,
                totalDelta);
        setCurrentItemInternal(nextPage, true, true, initialVelocity);
        endDrag();

        mFakeDragging = false;
    }
857603
public function end()
    {
        // Already ended, skip
        if ($this->ended === true) {
            return;
        }

        if (function_exists('fastcgi_finish_request')) {
            fastcgi_finish_request();
        }

        $this->ended = true;

        $this->completeContext();
        $this->completeResponse();

        // We really want to avoid throwing exceptions there
        try {
            $this->log();
        } catch (Exception $e) {
            error_log($e->getMessage());
        }
    }
1090561
function startDrag(e) {
      // Preventing the event's default action stops text being
      // selectable during the drag.
      e.preventDefault();

      var self = $(this);
      self.trigger('startDrag');

      // Measure how far the user's mouse is from the top of the scrollbar drag handle.
      var eventOffset = e.pageY;
      if (scrollDirection === 'horiz') {
        eventOffset = e.pageX;
      }
      dragOffset = eventOffset - $dragHandleEl.offset()[offsetAttr];

      $(document).on('mousemove', drag);
      $(document).on('mouseup', function() {
        endDrag.call(self);
      });
    }
549466
protected void animateDrop(
        final I_CmsDraggable draggable,
        final I_CmsDropTarget target,
        final I_CmsDNDController controller) {

        controller.onAnimationStart(draggable, target, this);
        stopDragging();
        Command callback = new Command() {

            /**
             * @see com.google.gwt.user.client.Command#execute()
             */
            public void execute() {

                controller.onDrop(draggable, target, CmsDNDHandler.this);
                target.onDrop(draggable);
                draggable.onDrop(target);
                clear();
            }
        };
        CmsPositionBean placeholderPosition = CmsPositionBean.getBoundingClientRect(m_placeholder);
        showEndAnimation(callback, placeholderPosition.getTop(), placeholderPosition.getLeft(), true);
    }
1364360
public void animateClose() {
        prepareContent();

        if (onDrawerScrollListener != null) {
            onDrawerScrollListener.onScrollStarted();
        }

        animateClose(vertical ? viewHandle.getTop() : viewHandle.getLeft());

        if (onDrawerScrollListener != null) {
            onDrawerScrollListener.onScrollEnded();
        }
    }
1043765
public void abort() {
        cancel();
        if (mDragState == STATE_SETTLING) {
            final int oldX = mScroller.getCurrX();
            final int oldY = mScroller.getCurrY();
            mScroller.abortAnimation();
            final int newX = mScroller.getCurrX();
            final int newY = mScroller.getCurrY();
            mCallback.onViewPositionChanged(mCapturedView, newX, newY, newX - oldX, newY - oldY);
        }
        setDragState(STATE_IDLE);
    }
500242
function onDrag( register, slot, args ) {
    const that = this;

    register( 'hammer.pan', function ( evt ) {
        if ( evt.isFinal ) return false;
        setHammerXY( that.$, evt );
        if ( typeof that._dragX === 'undefined' ) {
            that._dragX = evt.x;
            that._dragY = evt.y;
            that._dragStart = true;
        }
        setHammerVxVy.call( that, that.$, evt );
        const domEvt = evt.srcEvent;
        slot( {
            x: evt.x,
            y: evt.y,
            x0: evt.x0,
            y0: evt.y0,
            vx: evt.vx,
            vy: evt.vy,
            sx: evt.velocityX,
            sy: evt.velocityY,
            event: evt,
            target: evt.target,
            buttons: getButtons( evt ),
            preventDefault: domEvt.preventDefault.bind( domEvt ),
            stopPropagation: domEvt.stopImmediatePropagation.bind( domEvt )
        }, args );
        return true;
    } );
}
1204644
function(e) {
        if (this._dragging) return;
        this._dragging = true;

        // TODO: remove this and instead lock on pointer control events in future
        Crafty.s("Mouse").bind("MouseMove", this._ondrag);
        Crafty.s("Mouse").bind("MouseUp", this._onup);

        // if event undefined, use the last known position of the mouse
        this.trigger("StartDrag", e || Crafty.s("Mouse").lastMouseEvent);
        return this;
    }
533188
public synchronized void flush(boolean bSendFakeTrx)
    {
        try {
            if (bSendFakeTrx)
                this.getWriter().writeObject(FAKE_TRX);
            this.getWriter().flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
475833
function () {
            if (!this._draggable) {
                return;
            }

            this._draggable.$removeListeners({
                "dragstart" : {
                    fn : this._onDragStart,
                    scope : this
                },
                "move" : {
                    fn : this._onDragMove,
                    scope : this
                },
                "dragend" : {
                    fn : this._onDragEnd,
                    scope : this
                }
            });
            this._draggable.$dispose();
            this._draggable = null;
        }
923342
private boolean handleDrag() {
        if (!isAnimationRunning()) {
            if (dragHelper.hasThresholdBeenReached()) {
                int margin = Math.round(isMaximized() ? dragHelper.getDragDistance() :
                        initialMargin + dragHelper.getDragDistance());
                margin = Math.max(Math.max(margin, minMargin), 0);
                setTopMargin(margin);
            }

            return true;
        }

        return false;
    }
296841
function(e) {
      var _this = this, content, buttons;

      if (Math.abs(e.gesture.deltaY) > 5) {
        this._didDragUpOrDown = true;
      }

      // If we get a drag event, make sure we aren't in another drag, then check if we should
      // start one
      if (!this.isDragging && !this._dragOp) {
        this._startDrag(e);
      }

      // No drag still, pass it up
      if (!this._dragOp) {
        //ionic.views.ListView.__super__._handleDrag.call(this, e);
        return;
      }

      e.gesture.srcEvent.preventDefault();
      this._dragOp.drag(e);
    }
992796
@Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        if (mDragViewResId != -1) {
            setDragView(findViewById(mDragViewResId));
        }
        if (mScrollableViewResId != -1) {
            setScrollableView(findViewById(mScrollableViewResId));
        }
    }
949680
function() {
		this.element.off( 'mousedown touchstart', this._onTabClickFn );
		this.closeElement.off( 'click touchstart', this._onCloseClickFn );
		if( this._dragListener ) {
			this.contentItem.off( 'destroy', this._dragListener.destroy, this._dragListener );
			this._dragListener.off( 'dragStart', this._onDragStart );
			this._dragListener = null;
		}
		this.element.remove();
	}
889099
function (evt) {
                this._dragStartPosition = null;
                disconnectMouseEvents(this);

                var element = this._activeDrag;
                if (element) {
                    element.end();
                }

                this._candidateForDrag = null;
                this._activeDrag = null;
            }
1255613
public void end() {
        if (endCallback != null) {
            endCallback.accept(this, context);
        }

        if (currentPrompt != null) {
            currentPrompt.conversationEnded(context);
            currentPrompt = null;
        }

        Extensions.get(context.getBot(), ConversationRegistry.class).removeConversation(this);
        virgin = false;
    }
499783
function updateDragger(isDraggable) {
        if (isDraggable) {
            if (!dragger) {
                $el.addClass(CSS_CLASS_DRAGGABLE);
                dragger = scope.createComponent('dragger');
                dragger.init(config.$viewport);
            }
        } else {
            if (dragger) {
                $el.removeClass(CSS_CLASS_DRAGGABLE);
                scope.destroyComponent(dragger);
                dragger = null;
            }
        }
    }