Handles mouse drag.<p>

@param nativeEvent the mousemove event
764082
private void handleMove(NativeEvent nativeEvent) {

        Element imageElem = m_image.getElement();
        int offsetX = ((int)pageX(nativeEvent)) - imageElem.getParentElement().getAbsoluteLeft();
        int offsetY = ((int)pageY(nativeEvent)) - imageElem.getParentElement().getAbsoluteTop();
        if (m_coordinateTransform != null) {
            CmsPoint screenPoint = new CmsPoint(offsetX, offsetY);
            screenPoint = m_region.constrain(screenPoint); // make sure we remain in the screen region corresponding to original image (or crop).
            m_pointWidget.setCenterCoordsRelativeToParent((int)screenPoint.getX(), (int)screenPoint.getY());
            CmsPoint logicalPoint = m_coordinateTransform.transformForward(screenPoint);
            m_focalPoint = logicalPoint;
        }
    }
1272845
@Override
	public void handleMouseInput()
	{
		try
		{
			MOUSE_POSITION.udpate(this);
			UIComponent component = getComponentAt(MOUSE_POSITION.x(), MOUSE_POSITION.y());
			int button = Mouse.getEventButton();

			if (Mouse.getEventButtonState())
			{
				if (this.mc.gameSettings.touchscreen && this.touchValue++ > 0)
					return;

				this.eventButton = button;
				this.lastMouseEvent = Minecraft.getSystemTime();
				this.mousePressed(component, this.eventButton);
			}
			else if (button != -1)
			{
				if (this.mc.gameSettings.touchscreen && --this.touchValue > 0)
					return;

				this.eventButton = -1;
				this.mouseReleased(component, button);
				this.draggedComponent = null;
			}
			else if (this.eventButton != -1 && this.lastMouseEvent > 0L)
			{
				this.mouseDragged(this.eventButton);
			}

			if (MOUSE_POSITION.hasChanged())
			{
				if (component != null)
				{
					tooltip = component.getTooltip();
					if (component.isEnabled())
					{
						component.onMouseMove();
						component.setHovered(true);
					}
				}
				else
				{
					setHoveredComponent(null, false);
					tooltip = null;
				}
			}

			int delta = Mouse.getEventDWheel();
			if (delta == 0)
				return;
			else if (delta > 1)
				delta = 1;
			else if (delta < -1)
				delta = -1;

			if (component != null && component.isEnabled())
			{
				component.onScrollWheel(delta);
			}
		}
		catch (Exception e)
		{
			MalisisCore.message("A problem occured : " + e.getClass().getSimpleName() + ": " + e.getMessage());
			e.printStackTrace(new PrintStream(new FileOutputStream(FileDescriptor.out)));
		}
	}
551109
protected void previewNativeEvent(NativePreviewEvent event) {

        Event nativeEvent = Event.as(event.getNativeEvent());

        if ((nativeEvent.getTypeInt() == Event.ONCLICK) && hasPageChanged()) {
            EventTarget target = nativeEvent.getEventTarget();
            if (!Element.is(target)) {
                return;
            }
            Element element = Element.as(target);
            element = CmsDomUtil.getAncestor(element, CmsDomUtil.Tag.a);
            if (element == null) {
                return;
            }
            AnchorElement anc = AnchorElement.as(element);
            final String uri = anc.getHref();

            // avoid to abort events for date-picker widgets
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(uri)
                || (CmsDomUtil.getAncestor(element, "x-date-picker") != null)) {
                return;
            }
            nativeEvent.preventDefault();
            nativeEvent.stopPropagation();
            m_handler.leavePage(uri);
        }
        if (event.getTypeInt() == Event.ONKEYDOWN) {
            int keyCode = nativeEvent.getKeyCode();
            if ((keyCode == KeyCodes.KEY_F5) && hasPageChanged()) {
                // user pressed F5
                nativeEvent.preventDefault();
                nativeEvent.stopPropagation();
                m_handler.leavePage(Window.Location.getHref());
            }
            if (nativeEvent.getCtrlKey() || nativeEvent.getMetaKey()) {
                // look for short cuts
                if (keyCode == KeyCodes.KEY_E) {
                    if (nativeEvent.getShiftKey()) {
                        circleContainerEditLayers();
                    } else {
                        openNextElementView();
                    }
                    nativeEvent.preventDefault();
                    nativeEvent.stopPropagation();
                }
            }
        }
    }
550890
public static void ensureMouseOver(Element element) {

        NativeEvent nativeEvent = Document.get().createMouseOverEvent(
            0,
            0,
            0,
            0,
            0,
            false,
            false,
            false,
            false,
            0,
            null);
        element.dispatchEvent(nativeEvent);
    }
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);
		}
	}
1358531
def mousePressEvent(self, event):
        """"""
        super(AbstractDragView, self).mousePressEvent(event)
        self.dragStartPosition = event.pos()
856273
static void capturePageEvent(String eventName, final EventHandler handler) {
    HtmlPlatform.captureEvent(eventName, new EventHandler() {
      @Override
      public void handleEvent(NativeEvent evt) {
        handler.handleEvent(evt);
      }
    });
  }
1066713
void initTabEventHandler(final ToggleButton tabButton) {

        try {
            tabButton.setOnDragDetected(getHandler(MouseEvent.DRAG_DETECTED));
            tabButton.setOnAction(getHandler(ActionEvent.ACTION));

        } catch (final CoreException ce) {
            LOGGER.error("Error while attaching event handler", ce);
        }
    }
671622
def mouseMoveEvent(self, event):
        
        self.declaration.mouse_move_event(event)
        super(QtGraphicsView, self).mouseMoveEvent(event)
94045
void previewNativeEvent(NativePreviewEvent event) {

        Event nativeEvent = Event.as(event.getNativeEvent());
        if (event.getTypeInt() == Event.ONKEYDOWN) {
            int keyCode = nativeEvent.getKeyCode();
            if (nativeEvent.getCtrlKey() || nativeEvent.getMetaKey()) {
                // look for short cuts
                if (nativeEvent.getShiftKey()) {
                    if (keyCode == KeyCodes.KEY_S) {

                        exitWithSaving();
                        nativeEvent.preventDefault();
                        nativeEvent.stopPropagation();
                    } else if (keyCode == KeyCodes.KEY_X) {
                        confirmCancel();
                        nativeEvent.preventDefault();
                        nativeEvent.stopPropagation();
                    }
                } else if (keyCode == KeyCodes.KEY_S) {
                    if (checkValidation()) {
                        save();
                    }
                    nativeEvent.preventDefault();
                    nativeEvent.stopPropagation();
                }

            }
        }
    }
121199
function handleMouseup(event) {
        scope.broadcast('dragend');
        $window.off('mousemove', handleMousemove);
        $window.off('mouseup', handleMouseup);
        event.preventDefault();
    }
1112581
function(e) {
    if ((this.dragging && this.dragging.moved()) ||
      (this._map.dragging && this._map.dragging.moved())) {
      return;
    }

    this._fireMouseEvent(e);
  }
1321912
@SuppressWarnings("unchecked")
public void mouseDragged(MouseEvent e) {
    if(checkModifiers(e)) {
        if(startVertex != null) {
            transformEdgeShape(down, e.getPoint());
            transformArrowShape(down, e.getPoint());
        }
        VisualizationViewer<String,String> vv =
            (VisualizationViewer<String,String>)e.getSource();
        vv.repaint();
    }
}
238920
function(event){
    if (this.mouseDownMoveHandler) return;
    var pos = this.getEventPosition(event);
    E.fire(this.el, 'flotr:mousemove', [event, pos, this]);
    this.lastMousePos = pos;
  }
1129823
function handleDocumentMousemove(e) {
  let annotationId = overlay.getAttribute('data-target-id');
  let parentNode = overlay.parentNode;
  let rect = parentNode.getBoundingClientRect();
  let y = (dragStartY + (e.clientY - dragOffsetY));
  let x = (dragStartX + (e.clientX - dragOffsetX));
  let minY = 0;
  let maxY = rect.height;
  let minX = 0;
  let maxX = rect.width;

  if (y > minY && y + overlay.offsetHeight < maxY) {
    overlay.style.top = `${y}px`;
  }

  if (x > minX && x + overlay.offsetWidth < maxX) {
    overlay.style.left = `${x}px`;
  }
}
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());
    }
809791
private void registerEventHandler() {

        clearEventHandler();
        m_previewRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {

            @SuppressWarnings("synthetic-access")
            public void onPreviewNativeEvent(NativePreviewEvent event) {

                if (!(m_pointWidget.isAttached())) {
                    clearEventHandler();
                    return;
                }

                NativeEvent nativeEvent = event.getNativeEvent();
                if (nativeEvent == null) {
                    return;
                }
                int eventType = event.getTypeInt();
                switch (eventType) {
                    case Event.ONMOUSEUP:
                        clearEventHandler();
                        save();
                        break;
                    case Event.ONMOUSEMOVE:
                        handleMove(nativeEvent);
                        break;
                    default:
                        break;
                }
            }

        });
    }