Explorar el Código

Revert "Preventing premature start of drag due to Chrome move event #13381"

This reverts commit 7112abe944.

Change-Id: I2bc231ec20c27b508570c6358fb2d8128beb2735
tags/7.1.13
Henri Sara hace 10 años
padre
commit
e45294f717
Se han modificado 1 ficheros con 6 adiciones y 13 borrados
  1. 6
    13
      client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java

+ 6
- 13
client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java Ver fichero

@@ -422,20 +422,13 @@ public class VDragAndDropManager {
}
case Event.ONMOUSEMOVE:
case Event.ONTOUCHMOVE:
// only start the drag if the mouse / touch has moved a minimum distance
int startX = Util.getTouchOrMouseClientX(currentDrag.getCurrentGwtEvent());
int startY = Util.getTouchOrMouseClientY(currentDrag.getCurrentGwtEvent());
int nowX = Util.getTouchOrMouseClientX(event.getNativeEvent());
int nowY = Util.getTouchOrMouseClientY(event.getNativeEvent());
if (Math.abs(startX - nowX) > 3 || Math.abs(startY - nowY) > 3) {
if (deferredStartRegistration != null) {
deferredStartRegistration.removeHandler();
deferredStartRegistration = null;
}
currentDrag.setCurrentGwtEvent(event
.getNativeEvent());
startDrag.execute();
if (deferredStartRegistration != null) {
deferredStartRegistration.removeHandler();
deferredStartRegistration = null;
}
currentDrag.setCurrentGwtEvent(event
.getNativeEvent());
startDrag.execute();
break;
default:
// on any other events, clean up the

Cargando…
Cancelar
Guardar