flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [19/22] git commit: [flex-asjs] [refs/heads/develop] - more improvements to event dispatching for mouse events
Date Fri, 09 Jan 2015 16:10:32 GMT
more improvements to event dispatching for mouse events


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

Branch: refs/heads/develop
Commit: 534e8ad2f90f3e4b149b5a12dab790082902b95a
Parents: a52b754
Author: Alex Harui <aharui@apache.org>
Authored: Fri Jan 9 07:48:10 2015 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Jan 9 08:09:50 2015 -0800

----------------------------------------------------------------------
 .../js/FlexJS/src/org/apache/flex/events/EventDispatcher.js  | 4 +++-
 .../js/FlexJS/src/org/apache/flex/events/MouseEvent.js       | 8 ++++----
 2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/534e8ad2/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js b/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
index 8a101ff..617e8bc 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
@@ -107,6 +107,8 @@ org.apache.flex.events.EventDispatcher.elementEvents = {
   mouseout: 1,
   mouseup: 1,
   mousedown: 1,
-  mousemove: 1
+  mousemove: 1,
+  rollover: 1,
+  rollout: 1
 };
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/534e8ad2/frameworks/js/FlexJS/src/org/apache/flex/events/MouseEvent.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/MouseEvent.js b/frameworks/js/FlexJS/src/org/apache/flex/events/MouseEvent.js
index 885bb02..ece8e86 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/MouseEvent.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/MouseEvent.js
@@ -117,7 +117,7 @@ org.apache.flex.events.MouseEvent.mouseOverHandler = function(e) {
     for (j = 0; j < m; j++) {
       me = org.apache.flex.events.MouseEvent.makeMouseEvent(
                org.apache.flex.events.MouseEvent.ROLL_OUT, e);
-      outs[j].dispatchEvent(me);
+      outs[j].element.dispatchEvent(me);
     }
     org.apache.flex.events.MouseEvent.targets = targets.slice(0, index + 1);
   }
@@ -141,7 +141,7 @@ org.apache.flex.events.MouseEvent.mouseOverHandler = function(e) {
         for (j = 0; j < m; j++) {
           me = org.apache.flex.events.MouseEvent.makeMouseEvent(
                    org.apache.flex.events.MouseEvent.ROLL_OUT, e);
-          outs[j].dispatchEvent(me);
+          outs[j].element.dispatchEvent(me);
         }
         targets = targets.slice(0, index + 1);
         break;
@@ -151,7 +151,7 @@ org.apache.flex.events.MouseEvent.mouseOverHandler = function(e) {
     for (var i = 0; i < n; i++) {
       me = org.apache.flex.events.MouseEvent.makeMouseEvent(
                    org.apache.flex.events.MouseEvent.ROLL_OVER, e);
-      newTargets[i].dispatchEvent(me);
+      newTargets[i].element.dispatchEvent(me);
     }
     org.apache.flex.events.MouseEvent.targets = targets.concat(newTargets);
   }
@@ -178,7 +178,7 @@ org.apache.flex.events.MouseEvent.targets = [];
  */
 org.apache.flex.events.MouseEvent.makeMouseEvent = function(type, e) {
   var out = new MouseEvent(type);
-  out.initMouseEvent(type);
+  out.initMouseEvent(type, false, false);
   out.screenX = e.screenX;
   out.screenY = e.screenY;
   out.ctrlKey = e.ctrlKey;


Mime
View raw message