flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Added special cursor for drag and drop operation.
Date Wed, 02 Aug 2017 15:08:37 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop e6dc3e159 -> de15fe6b0


Added special cursor for drag and drop operation.


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

Branch: refs/heads/develop
Commit: de15fe6b031e47378d768524dcb059f1b146bccb
Parents: e6dc3e1
Author: Peter Ent <pent@apache.org>
Authored: Wed Aug 2 11:08:36 2017 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Wed Aug 2 11:08:36 2017 -0400

----------------------------------------------------------------------
 .../apache/flex/html/beads/SingleSelectionDragSourceBead.as | 2 ++
 .../flex/html/beads/controllers/DragMouseController.as      | 1 -
 .../flex/html/beads/controllers/DropMouseController.as      | 9 ++++++++-
 3 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de15fe6b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragSourceBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragSourceBead.as
b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragSourceBead.as
index 6ed7b62..aaab245 100644
--- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragSourceBead.as
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDragSourceBead.as
@@ -120,6 +120,8 @@ package org.apache.flex.html.beads
 			trace("SingleSelectionDragSourceBead received the DragStart");
 						
 			DragEvent.dragInitiator = this;
+			DragMouseController.dragImageOffsetX = -5;
+			DragMouseController.dragImageOffsetY = -5;
 			
 			var startHere:Object = event.target;
 			while( !(startHere is DataItemRenderer) && startHere != null) {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de15fe6b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as
b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as
index 96965b3..fc6b07a 100644
--- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as
@@ -236,7 +236,6 @@ package org.apache.flex.html.beads.controllers
 						COMPILE::JS {
 							dragImage.element.style['pointer-events'] = 'none';
 							dragImage.element.style['position'] = 'absolute';
-							dragImage.element.style['cursor'] = 'pointer';
 						}
                     }
                 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/de15fe6b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as
b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as
index f9eee77..cc2c7ac 100644
--- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as
@@ -28,6 +28,7 @@ package org.apache.flex.html.beads.controllers
 	import org.apache.flex.events.MouseEvent;
 	import org.apache.flex.geom.Point;
 	import org.apache.flex.utils.PointUtils;
+	import org.apache.flex.css2.Cursors;
 	
 	COMPILE::SWF {
 		import flash.display.InteractiveObject;
@@ -153,6 +154,8 @@ package org.apache.flex.html.beads.controllers
                 inside = true;
                 IUIBase(_strand).addEventListener(DragEvent.DRAG_END, dragEndHandler);
                 IUIBase(_strand).addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+				
+				Cursors.setCursor(_strand as IUIBase, Cursors.MOVE);
             }
             else
             {
@@ -170,6 +173,8 @@ package org.apache.flex.html.beads.controllers
                 dragEvent = DragEvent.createDragEvent("dragExit", event);
 				dispatchEvent(dragEvent);
                 inside = false;
+				
+				Cursors.setCursor(_strand as IUIBase, Cursors.AUTO);
             }
             IUIBase(_strand).removeEventListener(DragEvent.DRAG_END, dragEndHandler);
             IUIBase(_strand).removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);		

@@ -199,7 +204,9 @@ package org.apache.flex.html.beads.controllers
             
             inside = false;
             IUIBase(_strand).removeEventListener(DragEvent.DRAG_END, dragEndHandler);
-            IUIBase(_strand).removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);		

+            IUIBase(_strand).removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);	
+			
+			Cursors.setCursor(_strand as IUIBase, Cursors.AUTO);
         }
 		
 	}


Mime
View raw message