flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [06/16] git commit: [flex-asjs] [refs/heads/develop] - use screenXY and don't use stopImmediateProp as it doesn't exist in google closure library
Date Mon, 05 Jan 2015 23:21:25 GMT
use screenXY and don't use stopImmediateProp as it doesn't exist in google closure library


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/828d0b4e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/828d0b4e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/828d0b4e

Branch: refs/heads/develop
Commit: 828d0b4ef59220955a487fc079407dddb3171d20
Parents: 22666df
Author: Alex Harui <aharui@apache.org>
Authored: Mon Jan 5 10:10:30 2015 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Jan 5 15:21:00 2015 -0800

----------------------------------------------------------------------
 .../html/beads/controllers/DragMouseController.as     | 14 ++++++--------
 .../html/beads/controllers/DropMouseController.as     |  2 --
 2 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/828d0b4e/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DragMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DragMouseController.as
b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DragMouseController.as
index 5cb5f54..321a91a 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DragMouseController.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DragMouseController.as
@@ -211,8 +211,8 @@ package org.apache.flex.html.beads.controllers
             trace("dragMouseDown");
             IUIBase(_strand).topMostEventDispatcher.addEventListener(MouseEvent.MOUSE_MOVE,
dragMouseMoveHandler);
             IUIBase(_strand).topMostEventDispatcher.addEventListener(MouseEvent.MOUSE_UP,
dragMouseUpHandler);
-            mouseDownX = event.stageX;
-            mouseDownY = event.stageY;
+            mouseDownX = event.screenX;
+            mouseDownY = event.screenY;
         }
         
         private function dragMouseMoveHandler(event:MouseEvent):void
@@ -224,8 +224,8 @@ package org.apache.flex.html.beads.controllers
             if (!dragging)
             {
                 trace("not dragging anything else");
-                if (Math.abs(event.stageX - mouseDownX) > threshold ||
-                    Math.abs(event.stageY - mouseDownY) > threshold)
+                if (Math.abs(event.screenX - mouseDownX) > threshold ||
+                    Math.abs(event.screenY - mouseDownY) > threshold)
                 {
                     trace("sending dragStart");
                     dragEvent = new DragEvent("dragStart", true, true);
@@ -236,7 +236,7 @@ package org.apache.flex.html.beads.controllers
                         dragging = true;
                         host = UIUtils.findPopUpHost(_strand as IUIBase);
                         host.addElement(dragImage);
-                        pt = PointUtils.globalToLocal(new Point(event.stageX, event.stageY),
host);
+                        pt = PointUtils.globalToLocal(new Point(event.screenX, event.screenY),
host);
                         dragImage.x = pt.x + dragImageOffsetX;
                         dragImage.y = pt.y + dragImageOffsetY;
                     }
@@ -246,11 +246,10 @@ package org.apache.flex.html.beads.controllers
             {
                 trace("sending dragMove", event.target);
                 dragEvent = new DragEvent("dragMove", true, true);
-                event.stopImmediatePropagation();
                 dragEvent.copyMouseEventProperties(event);
                 dragEvent.dragSource = dragSource;
                 dragEvent.dragInitiator = dragInitiator;
-                pt = PointUtils.globalToLocal(new Point(event.stageX, event.stageY), host);
+                pt = PointUtils.globalToLocal(new Point(event.screenX, event.screenY), host);
                 dragImage.x = pt.x + dragImageOffsetX;
                 dragImage.y = pt.y + dragImageOffsetY;
                 event.target.dispatchEvent(dragEvent);
@@ -267,7 +266,6 @@ package org.apache.flex.html.beads.controllers
                 trace("sending dragEnd");
                 dragEvent = new DragEvent("dragEnd", true, true);
                 dragEvent.copyMouseEventProperties(event);
-                event.stopImmediatePropagation();
                 dragEvent.dragSource = dragSource;
                 dragEvent.dragInitiator = dragInitiator;
                 event.target.dispatchEvent(dragEvent);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/828d0b4e/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DropMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DropMouseController.as
b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DropMouseController.as
index 82a277a..1b32f31 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DropMouseController.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DropMouseController.as
@@ -157,7 +157,6 @@ package org.apache.flex.html.beads.controllers
                 dragEvent.dragInitiator = dragInitiator;
                 dragSource = null;
                 dragInitiator = null;
-                event.stopImmediatePropagation();
                 dispatchEvent(dragEvent);
                 inside = false;
             }
@@ -176,7 +175,6 @@ package org.apache.flex.html.beads.controllers
             dragEvent.dragInitiator = event.dragInitiator;
             dragSource = null;
             dragInitiator = null;
-            event.stopImmediatePropagation();
             dispatchEvent(dragEvent);
             
             inside = false;


Mime
View raw message