flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yish...@apache.org
Subject [1/4] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Enable dblclick events by default (just like JS's default).
Date Wed, 26 Oct 2016 15:53:07 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/refactor-sprite 37ab65649 -> b8e533bec


Enable dblclick events by default (just like JS's default).


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

Branch: refs/heads/refactor-sprite
Commit: a44ce435f29723c5ed94b45b2764a9f438e2f853
Parents: f24c9e6
Author: yishayw <yishayjobs@hotmail.com>
Authored: Wed Oct 26 18:46:34 2016 +0300
Committer: yishayw <yishayjobs@hotmail.com>
Committed: Wed Oct 26 18:46:34 2016 +0300

----------------------------------------------------------------------
 .../projects/Core/src/main/flex/org/apache/flex/core/UIBase.as   | 4 ++++
 .../Core/src/main/flex/org/apache/flex/events/ElementEvents.as   | 4 +++-
 .../flex/org/apache/flex/events/utils/MouseEventConverter.as     | 3 ++-
 3 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a44ce435/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
index ebaa2d9..2a9ce3e 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
@@ -30,6 +30,9 @@ package org.apache.flex.core
 	import org.apache.flex.events.MouseEvent;
 	import org.apache.flex.events.ValueChangeEvent;
 	import org.apache.flex.events.utils.MouseEventConverter;
+	COMPILE::SWF {
+	import flash.display.InteractiveObject;
+	}
 	
 	/**
 	 *  Set a different class for click events so that
@@ -1328,6 +1331,7 @@ package org.apache.flex.core
 			{
 				element = new WrappedSprite();
 				element.flexjs_wrapper = this;
+				(element as InteractiveObject).doubleClickEnabled = true; // make JS and flash consistent
                 return element;
 			}
 			COMPILE::JS

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a44ce435/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
index 22b8029..fc1353b 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
@@ -28,7 +28,8 @@ package org.apache.flex.events
         //--------------------------------------
         
         static public const elementEvents:Object = {
-            'click': 1,
+			'click': 1,
+			'doubleClick': 1,
             'change': 1,
             'keyup': 1,
             'keydown': 1,
@@ -53,6 +54,7 @@ package org.apache.flex.events
 
 		static public const elementEvents:Object = {
                 'click': 1,
+				'dblclick': 1,
                 'change': 1,
                 'keyup': 1,
                 'keydown': 1,

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a44ce435/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
index 72f4ff1..d0f1e51 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
@@ -105,7 +105,8 @@ package org.apache.flex.events.utils
          *  @productversion FlexJS 0.0
          */
         public static var allConvertedEvents:Array = [
-            flash.events.MouseEvent.CLICK,
+			flash.events.MouseEvent.CLICK,
+			flash.events.MouseEvent.DOUBLE_CLICK,
             flash.events.MouseEvent.MOUSE_DOWN,
             flash.events.MouseEvent.MOUSE_UP,
             flash.events.MouseEvent.ROLL_OVER,


Mime
View raw message