Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita98ce6f

Browse files
author
zhourenjian
committed
Fixed a bug that Drag and Drop may lose the first few mouse moves.
1 parent71fb043 commita98ce6f

File tree

1 file changed

+4
-2
lines changed
  • sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/internal/dnd

1 file changed

+4
-2
lines changed

‎sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/internal/dnd/DNDUtils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ public static boolean onmousemove(Object e, DragAndDrop oThis) {
8383
oThis.startX,oThis.startY);
8484
if (oThis.status ==0) {
8585
oThis.status =1;
86-
oThis.startX =dndEvt.startX =evt.x;
87-
oThis.startY =dndEvt.startY =evt.y;
86+
dndEvt.startX =oThis.startX;
87+
dndEvt.startY =oThis.startY;
8888
dndEvt.mouseMoveTo (evt.x,evt.y);
8989
oThis.notifyDragBegan (dndEvt);
9090
}
@@ -99,6 +99,8 @@ public static boolean onmousedown(Object e, DragAndDrop oThis) {
9999
}
100100
document.onselectstart =DNDUtils.onselectstart;
101101
evt.target.onselectstart =DNDUtils.onselectstart;
102+
oThis.startX =evt.x;
103+
oThis.startY =evt.y;
102104
document.onmousemove =DNDUtils.bindFunctionWith (DNDUtils.onmousemove,oThis);
103105
document.onkeyup =DNDUtils.bindFunctionWith (DNDUtils.onkeyup,oThis);
104106
document.onmouseup =DNDUtils.bindFunctionWith (DNDUtils.onmouseup,oThis);//oThis.element.onmouseup;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp