Called on mouse up in the caption area, ends dragging by ending event
capture.

@param event the mouse up event that ended dragging

@see DOM#releaseCapture
@see #beginDragging
@see #endDragging
768972
protected void endDragging(MouseUpEvent event) {

        m_dragging = false;
        DOM.releaseCapture(getElement());
        removeStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().dragging());
    }
1049004
function (event) {
        if (this.hover === true) {
            this.grabOffset.set(event.gameX, event.gameY);
            this.grabOffset.sub(this.pos);
            this.selected = true;
            // don"t propagate the event furthermore
            return false;
        }
    }
1137519
function (event){

    /*
    // @TODO Context menu?
    if(event.isRightClick()) {
      event.stop();

      var overlay = this.overlay;
      overlay.hide();

      function cancelContextMenu () {
        overlay.show();
        E.stopObserving(document, 'mousemove', cancelContextMenu);
      }
      E.observe(document, 'mousemove', cancelContextMenu);
      return;
    }
    */

    if (this.mouseUpHandler) return;
    this.mouseUpHandler = _.bind(function (e) {
      E.stopObserving(document, 'mouseup', this.mouseUpHandler);
      E.stopObserving(document, 'mousemove', this.mouseDownMoveHandler);
      this.mouseDownMoveHandler = null;
      this.mouseUpHandler = null;
      // @TODO why?
      //e.stop();
      E.fire(this.el, 'flotr:mouseup', [e, this]);
    }, this);
    this.mouseDownMoveHandler = _.bind(function (e) {
        var pos = this.getEventPosition(e);
        E.fire(this.el, 'flotr:mousemove', [event, pos, this]);
        this.lastMousePos = pos;
    }, this);
    E.observe(document, 'mouseup', this.mouseUpHandler);
    E.observe(document, 'mousemove', this.mouseDownMoveHandler);
    E.fire(this.el, 'flotr:mousedown', [event, this]);
    this.ignoreClick = false;
  }
881102
@Override
	public void onMouseDown(MouseDownEvent event) {
		if (isActive()) {
			if (BboxService.contains(object.getUserBounds(), getUserCoordinate(event))) {
				dragHandler.onMouseDown(event);
				event.stopPropagation();
			}
		}
	}
280130
@Override
    public void handleEvent(Event event) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "Received event: " + event.getTopic());
        }
        // if (event.getTopic().equals(PURGE_EVENT)) {
        this.sessionMgr.startPurge();
        // }
    }
751292
@Override
    public void mouseReleased(MouseEvent e) {
        if (e.getComponent() == this
                && (e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) {
            int y = e.getY();
            Font font = fileWindow.textArea.getFont();
            FontMetrics metrics = getFontMetrics(font);
            int h = metrics.getHeight();
            int line = y/h;
            if (line == pressLine) {
                fileWindow.toggleBreakPoint(line + 1);
            } else {
                pressLine = -1;
            }
        }
    }
41212
function onPointerUpCaptured( tracker, event ) {
        var pointsList = tracker.getActivePointersListByType( getPointerType( event ) );
        if ( pointsList.getById( event.pointerId ) ) {
            handlePointerUp( tracker, event );
        }
        $.stopEvent( event );
    }
1071002
protected void beginDragging(MouseDownEvent event) {

        m_dragging = true;
        m_windowWidth = Window.getClientWidth();
        m_clientLeft = Document.get().getBodyOffsetLeft();
        m_clientTop = Document.get().getBodyOffsetTop();
        DOM.setCapture(getElement());
        m_dragStartX = event.getX();
        m_dragStartY = event.getY();
        addStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().dragging());
    }
369995
function() {
			$(document).unbind('mousemove', this._mousemove);
			$(document).unbind('mouseup', this._mouseup);
			if (!this.moved ) {
				this.event = this.element = null;
			}
			//this.selection();
			this.destroyed();
		}
414923
@Override
  public synchronized void handleEvent(final Event event) {
    if (event.getType() == EventType.JOB_FINISHED && Status.FAILED
        .equals(event.getData().getStatus())) {
      this.value = this.value + 1;
    }
  }
529734
protected void mouseReleased(UIComponent component, int button)
	{
		try
		{
			if (inventoryContainer != null)
			{
				if (inventoryContainer.shouldResetDrag(button))
				{
					MalisisGui.sendAction(ActionType.DRAG_RESET, null, 0);
					UISlot.buttonRelased = false;
					return;
				}
				if (inventoryContainer.shouldEndDrag(button))
				{
					MalisisGui.sendAction(ActionType.DRAG_END, null, 0);
					return;
				}
			}

			if (component != null && component.isEnabled())
			{
				MouseButton mb = MouseButton.getButton(button);
				if (draggedComponent != null)
					draggedComponent.onButtonRelease(mb);
				if (component == focusedComponent)
				{
					if (mb == MouseButton.LEFT)
						component.onClick();
					else if (mb == MouseButton.RIGHT)
						component.onRightClick();
				}
			}
		}
		catch (Exception e)
		{
			MalisisCore.message("A problem occured : " + e.getClass().getSimpleName() + ": " + e.getMessage());
			e.printStackTrace(new PrintStream(new FileOutputStream(FileDescriptor.out)));
		}
	}
504935
function(event)
	{
		if(!this._isSuspended)
		{
			var res, view = this;
			while(view)
			{
				if(view.dispatcher !== null && view.dispatcher.hasAction(event.type))
				{
					if(process.env.NODE_ENV !== 'production')
					{
						try {
							view.dispatcher.trigger(event);
						}
						catch(e)
						{
							console.error('Caught exception in ' + this.element.getAttribute('data-kff-view') + '#dispatchEvent');
							console.info('View element', this.element);
							console.info('View object', this);
							console.info('Action object', event);
							console.info('Original error follows…');
							if(this.element)
							{
								this.element.scrollIntoView();
								this.element.style.outline = '2px dashed red';
							}
							throw e;
						}
					}
					else
					{
						view.dispatcher.trigger(event);
					}
					break;
				}
				if(view._isolated) view = null;
				else view = view.parentView;
			}
		}
	}
144064
function( event ){
                // read the data before hijacking anything
                var dd = event.data;
                // handle various events
                switch ( event.type ){
                    // mousemove, check distance, start dragging
                    case !dd.dragging && 'touchmove':
                        event.preventDefault();
                    case !dd.dragging && 'mousemove':
                        //  drag tolerance, x² + y² = distance²
                        if ( Math.pow(  event.pageX-dd.pageX, 2 ) + Math.pow(  event.pageY-dd.pageY, 2 ) < Math.pow( dd.distance, 2 ) )
                            break; // distance tolerance not reached
                        event.target = dd.target; // force target from "mousedown" event (fix distance issue)
                        drag.hijack( event, "dragstart", dd ); // trigger "dragstart"
                        if ( dd.propagates ) // "dragstart" not rejected
                            dd.dragging = true; // activate interaction
                        // mousemove, dragging
                    case 'touchmove':
                        event.preventDefault();
                    case 'mousemove':
                        if ( dd.dragging ){
                            // trigger "drag"
                            drag.hijack( event, "drag", dd );
                            if ( dd.propagates ){
                                // manage drop events
                                if ( dd.drop !== false && $special.drop )
                                    $special.drop.handler( event, dd ); // "dropstart", "dropend"
                                break; // "drag" not rejected, stop
                            }
                            event.type = "mouseup"; // helps "drop" handler behave
                        }
                        // mouseup, stop dragging
                    case 'touchend':
                    case 'mouseup':
                    default:
                        if ( drag.touched )
                            $event.remove( drag.touched, "touchmove touchend", drag.handler ); // remove touch events
                        else
                            $event.remove( document, "mousemove mouseup", drag.handler ); // remove page events
                        if ( dd.dragging ){
                            if ( dd.drop !== false && $special.drop )
                                $special.drop.handler( event, dd ); // "drop"
                            drag.hijack( event, "dragend", dd ); // trigger "dragend"
                        }
                        drag.textselect( true ); // enable text selection
                        // if suppressing click events...
                        if ( dd.click === false && dd.dragging )
                            $.data( dd.mousedown, "suppress.click", new Date().getTime() + 5 );
                        dd.dragging = drag.touched = false; // deactivate element
                        break;
                }
            }
609192
private void stopPanning(HumanInputEvent<?> event) {
		mapWidget.getMapModel().getMapView().setPanDragging(false);
		panning = false;
		moving = false;
		mapWidget.setCursorString(mapWidget.getDefaultCursorString());
		if (null != event) {
			updateView(event);
		}
	}
291411
@Override
	public void onDown(HumanInputEvent<?> event) {
		if (dragging && leftWidget) {
			// mouse was moved outside of widget
			doSelect(event);

		} else if (!isRightMouseButton(event)) {
			// no point trying to select when there is no active layer
			dragging = true;
			leftWidget = false;
			timestamp = new Date().getTime();
			begin = getLocation(event, RenderSpace.SCREEN);
			bounds = new Bbox(begin.getX(), begin.getY(), 0.0, 0.0);
			shift = event.isShiftKeyDown();
			rectangle = new Rectangle("selectionRectangle");
			rectangle.setStyle(rectangleStyle);
			rectangle.setBounds(bounds);
			mapWidget.render(rectangle, RenderGroup.SCREEN, RenderStatus.UPDATE);
		}
	}
1359610
function ( event ) {

        //if(!event.type) return;

      //  console.log( event.type )

        if( event.type.indexOf( R.prevDefault ) !== -1 ) event.preventDefault(); 

        if( event.type === 'contextmenu' ) return; 

        //if( event.type === 'keydown'){ R.editText( event ); return;}

        //if( event.type !== 'keydown' && event.type !== 'wheel' ) event.preventDefault();
        //event.stopPropagation();

        R.findZone();
       
        var e = R.e;

        if( event.type === 'keydown') R.editText( event );

        if( event.type === 'wheel' ) e.delta = event.deltaY > 0 ? 1 : -1;
        else e.delta = 0;
        
        e.clientX = event.clientX || 0;
        e.clientY = event.clientY || 0;
        e.type = event.type;

        // mobile

        if( R.isMobile ){

            if( event.touches && event.touches.length > 0 ){
        
                e.clientX = event.touches[ 0 ].clientX || 0;
                e.clientY = event.touches[ 0 ].clientY || 0;

            }

            if( event.type === 'touchstart') e.type = 'mousedown';
            if( event.type === 'touchend') e.type = 'mouseup';
            if( event.type === 'touchmove') e.type = 'mousemove';

        }
        
        
        /*
        if( event.type === 'touchstart'){ e.type = 'mousedown'; R.findID( e ); }
        if( event.type === 'touchend'){ e.type = 'mouseup';  if( R.ID !== null ) R.ID.handleEvent( e ); R.clearOldID(); }
        if( event.type === 'touchmove'){ e.type = 'mousemove';  }
        */


        if( e.type === 'mousedown' ) R.lock = true;
        if( e.type === 'mouseup' ) R.lock = false;

        if( R.isMobile && e.type === 'mousedown' ) R.findID( e );
        if( e.type === 'mousemove' && !R.lock ) R.findID( e );
        

        if( R.ID !== null ){

            if( R.ID.isCanvasOnly ) {

                e.clientX = R.ID.mouse.x;
                e.clientY = R.ID.mouse.y;

            }

            R.ID.handleEvent( e );

        }

        if( R.isMobile && e.type === 'mouseup' ) R.clearOldID();

    }
1308147
protected void stopPanning(HumanInputEvent<?> event) {
		dragging = false;
		mapPresenter.setCursor("default");
		if (null != event && dragPositions.size() >= 2) {
			logger.info("kinetics started");
			// start kinetic animation
			Coordinate dragStart = toWorld(dragPositions.get(0));
			Coordinate dragStop = toWorld(dragPositions.get(dragPositions.size() - 1));
			long timeStart = dragTimes.get(0).getTime();
			long timeStop = dragTimes.get(dragTimes.size() - 1).getTime();
			int delta = (int) (timeStop - timeStart);
			long delay = new Date().getTime() - timeStop;
			if (delta > 0 && delay < MAX_KINETIC_DELAY) {
				// map moves in the inverse direction !
				Coordinate direction = subtract(dragStart, dragStop);
				double distance = abs(direction);
				Coordinate current = mapPresenter.getViewPort().getPosition();
				double resolution = mapPresenter.getViewPort().getResolution();
				KineticTrajectory trajectory = new KineticTrajectory(new View(current, resolution), direction, distance
						/ delta);
				mapPresenter.getViewPort().registerAnimation(
						new NavigationAnimationImpl(mapPresenter.getViewPort(), mapPresenter.getEventBus(), trajectory,
								(int) trajectory.getDuration()));
			} else {
				mapPresenter.getViewPort().stopInteraction();
			}
		}
	}