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/feature/dragAndDrop] - Drag and drop work thus far. Not complete.
Date Tue, 08 Aug 2017 12:41:53 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/feature/dragAndDrop [created] bdc624644


Drag and drop work thus far. Not complete.


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

Branch: refs/heads/feature/dragAndDrop
Commit: bdc62464429130da6049d4da4530eed4c4be1e6c
Parents: 574faa1
Author: Peter Ent <pent@apache.org>
Authored: Tue Aug 8 08:41:51 2017 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Tue Aug 8 08:41:51 2017 -0400

----------------------------------------------------------------------
 .../Basic/src/main/flex/BasicClasses.as         |   2 +
 .../main/flex/org/apache/flex/css2/DragMove.fxg |  48 ++++++++
 .../flex/org/apache/flex/css2/DragReject.fxg    |  73 ++++++++++++
 .../DragDrop/src/main/flex/DragDropClasses.as   |   1 +
 .../SingleSelectionDataGridDropTargetBead.as    | 112 +++++++++++++++++++
 .../html/beads/SingleSelectionDragSourceBead.as |   4 +-
 .../html/beads/SingleSelectionDropTargetBead.as |  51 ++++-----
 .../beads/controllers/DragMouseController.as    |   5 +-
 .../src/main/resources/basic-manifest.xml       |   2 +
 frameworks/projects/Express/pom.xml             |  14 +++
 .../src/main/config/compile-swf-config.xml      |   1 +
 .../main/flex/org/apache/flex/express/List.as   |  38 +++++++
 12 files changed, 322 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/frameworks/projects/Basic/src/main/flex/BasicClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/BasicClasses.as b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
index 539beaa..0aaa08b 100644
--- a/frameworks/projects/Basic/src/main/flex/BasicClasses.as
+++ b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
@@ -238,6 +238,8 @@ internal class BasicClasses
     COMPILE::SWF
     {
         import org.apache.flex.css2.Copy; Copy;
+		import org.apache.flex.css2.DragMove; DragMove;
+		import org.apache.flex.css2.DragReject; DragReject;
     }
 }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/DragMove.fxg
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/DragMove.fxg b/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/DragMove.fxg
new file mode 100644
index 0000000..212ef6c
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/DragMove.fxg
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<Graphic version="2.0" ATE:version="1.0.0" flm:version="1.0.0" d:using="" 
+	xmlns="http://ns.adobe.com/fxg/2008" xmlns:ATE="http://ns.adobe.com/ate/2009" xmlns:d="http://ns.adobe.com/fxg/2008/dt"

+	xmlns:flm="http://ns.adobe.com/flame/2008"
+	xmlns:afx="http://ns.apache.org/flex/2012" afx:className="org.apache.flex.css2.DragMove"
afx:baseClassName="flash.display.Sprite" >
+  <Library>
+    <Definition name="Drag_Cursors_Elements_Cursor" flm:originalName="Drag Cursors/Elements/Cursor">
+      <Group>
+        <Group d:type="layer" d:userLabel="Layer 1">
+          <Path data="M265.85 158 264.85 158 264.85 157 263.85 157 263.85 168 264.85 168
264.85 169 263.85 169 263.85 170 262.85 170 262.85 155 263.85 155 263.85 156 264.85 156 264.85
157 265.85 157 265.85 158 266.85 158 266.85 159 267.85 159 267.85 160 266.85 160
+ 266.85 159 265.85 159 265.85 158M269.85 162 268.85 162 268.85 161 267.85 161 267.85 160
268.85 160 268.85 161 269.85 161 269.85 162 270.85 162 270.85 163 271.85 163 271.85 164 270.85
164 270.85 163 269.85 163 269.85 162M266.85 167 265.85 167
+ 265.85 168 264.85 168 264.85 167 265.85 167 265.85 166 266.85 166 266.85 167 267.85 167
267.85 169 268.85 169 268.85 171 270.85 171 270.85 169 269.85 169 269.85 167 268.85 167 268.85
165 271.85 165 271.85 164 272.85 164 272.85 165 273.85 165
+ 273.85 166 269.85 166 269.85 167 270.85 167 270.85 169 271.85 169 271.85 172 268.85 172
268.85 171 267.85 171 267.85 169 266.85 169 266.85 167">
+            <fill>
+              <SolidColor color="#FFFFFF"/>
+            </fill>
+          </Path>
+          <Path data="M270.85 169 270.85 171 268.85 171 268.85 169 267.85 169 267.85 167
266.85 167 266.85 166 265.85 166 265.85 167 264.85 167 264.85 168 263.85 168 263.85 157 264.85
157 264.85 158 265.85 158 265.85 159 266.85 159 266.85 160 267.85 160 267.85 161
+ 268.85 161 268.85 162 269.85 162 269.85 163 270.85 163 270.85 164 271.85 164 271.85 165
268.85 165 268.85 167 269.85 167 269.85 169 270.85 169">
+            <fill>
+              <SolidColor/>
+            </fill>
+          </Path>
+        </Group>
+      </Group>
+    </Definition>
+  </Library>
+          <Drag_Cursors_Elements_Cursor x="-263.85" y="-157"/>
+  <Private/>
+</Graphic>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/DragReject.fxg
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/DragReject.fxg b/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/DragReject.fxg
new file mode 100644
index 0000000..d85703a
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/css2/DragReject.fxg
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<Graphic version="2.0" ATE:version="1.0.0" flm:version="1.0.0" d:using="" 
+	xmlns="http://ns.adobe.com/fxg/2008" xmlns:ATE="http://ns.adobe.com/ate/2009" xmlns:d="http://ns.adobe.com/fxg/2008/dt"

+	xmlns:flm="http://ns.adobe.com/flame/2008"
+	xmlns:afx="http://ns.apache.org/flex/2012" afx:className="org.apache.flex.css2.DragReject"
afx:baseClassName="flash.display.Sprite" >
+  <Library>
+    <Definition name="Drag_Cursors_Elements_Cursor" flm:originalName="Drag Cursors/Elements/Cursor">
+      <Group>
+        <Group d:type="layer" d:userLabel="Layer 1">
+          <Path data="M265.85 158 264.85 158 264.85 157 263.85 157 263.85 168 264.85 168
264.85 169 263.85 169 263.85 170 262.85 170 262.85 155 263.85 155 263.85 156 264.85 156 264.85
157 265.85 157 265.85 158 266.85 158 266.85 159 267.85 159 267.85 160 266.85 160
+ 266.85 159 265.85 159 265.85 158M269.85 162 268.85 162 268.85 161 267.85 161 267.85 160
268.85 160 268.85 161 269.85 161 269.85 162 270.85 162 270.85 163 271.85 163 271.85 164 270.85
164 270.85 163 269.85 163 269.85 162M266.85 167 265.85 167
+ 265.85 168 264.85 168 264.85 167 265.85 167 265.85 166 266.85 166 266.85 167 267.85 167
267.85 169 268.85 169 268.85 171 270.85 171 270.85 169 269.85 169 269.85 167 268.85 167 268.85
165 271.85 165 271.85 164 272.85 164 272.85 165 273.85 165
+ 273.85 166 269.85 166 269.85 167 270.85 167 270.85 169 271.85 169 271.85 172 268.85 172
268.85 171 267.85 171 267.85 169 266.85 169 266.85 167">
+            <fill>
+              <SolidColor color="#FFFFFF"/>
+            </fill>
+          </Path>
+          <Path data="M270.85 169 270.85 171 268.85 171 268.85 169 267.85 169 267.85 167
266.85 167 266.85 166 265.85 166 265.85 167 264.85 167 264.85 168 263.85 168 263.85 157 264.85
157 264.85 158 265.85 158 265.85 159 266.85 159 266.85 160 267.85 160 267.85 161
+ 268.85 161 268.85 162 269.85 162 269.85 163 270.85 163 270.85 164 271.85 164 271.85 165
268.85 165 268.85 167 269.85 167 269.85 169 270.85 169">
+            <fill>
+              <SolidColor/>
+            </fill>
+          </Path>
+        </Group>
+      </Group>
+    </Definition>
+  </Library>
+          <Group>
+            <Path data="M11.9 16.075Q10.014648 14.18125 10.025 11.475 10.014648 8.7685547
11.9 6.875 13.80625 4.9769531 16.525 4.975 19.231055 4.9769531 21.125 6.875 23.022852 8.7685547
23.025 11.475 23.022852 14.18125 21.125 16.075 19.231055 17.972852 16.525 17.975
+ 13.80625 17.972852 11.9 16.075">
+              <fill>
+                <SolidColor alpha="0.2"/>
+              </fill>
+            </Path>
+          </Group>
+          <Group>
+            <Path data="M13.65 5.45Q14.75 5 16 5 18.45 5 20.2 6.75 21.95 8.5 22 11 22
13.45 20.2 15.2 18.45 16.95 16 17 14.75 17 13.65 16.5 12.55 16.05 11.75 15.2 10.9 14.4 10.45
13.3 10 12.2 10 11 10 9.75 10.45 8.65 10.9 7.55 11.75 6.75 12.55 5.9 13.65 5.45">
+              <fill>
+                <RadialGradient x="16" y="11" scaleX="11.975" scaleY="11.975">
+                  <GradientEntry ratio="0" color="#FE5050"/>
+                  <GradientEntry ratio="1" color="#CC0000"/>
+                </RadialGradient>
+              </fill>
+            </Path>
+          </Group>
+          <Drag_Cursors_Elements_Cursor x="-263.85" y="-157"/>
+          <Group>
+            <Path data="M12.45 8.85 13.85 7.45 15.975 9.575 18.1 7.45 19.5 8.85 17.375
10.975 19.5 13.1 18.1 14.5 15.975 12.375 13.85 14.5 12.45 13.1 14.575 10.975 12.45 8.85">
+              <fill>
+                <SolidColor color="#FFFFFF"/>
+              </fill>
+            </Path>
+          </Group>
+  <Private/>
+</Graphic>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as b/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
index f2fd9c1..9a91547 100644
--- a/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
+++ b/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
@@ -34,6 +34,7 @@ internal class DragDropClasses
 	import org.apache.flex.html.beads.SingleSelectionDragSourceBead; SingleSelectionDragSourceBead;
 	import org.apache.flex.html.beads.SingleSelectionDropIndicatorBead; SingleSelectionDropIndicatorBead;
 	import org.apache.flex.html.beads.SingleSelectionDropTargetBead; SingleSelectionDropTargetBead;
+	import org.apache.flex.html.beads.SingleSelectionDataGridDropTargetBead; SingleSelectionDataGridDropTargetBead;
 }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDataGridDropTargetBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDataGridDropTargetBead.as
b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDataGridDropTargetBead.as
new file mode 100644
index 0000000..e4b2a43
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDataGridDropTargetBead.as
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads
+{
+	import org.apache.flex.collections.ArrayList;
+	import org.apache.flex.core.DropType;
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IDataProviderModel;
+	import org.apache.flex.core.IItemRenderer;
+	import org.apache.flex.core.IItemRendererParent;
+	import org.apache.flex.core.IParent;
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.IUIBase;
+	import org.apache.flex.core.UIBase;
+	import org.apache.flex.events.DragEvent;
+	import org.apache.flex.events.EventDispatcher;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.geom.Point;
+	import org.apache.flex.geom.Rectangle;
+	import org.apache.flex.html.beads.controllers.DropMouseController;
+	import org.apache.flex.html.supportClasses.DataItemRenderer;
+	import org.apache.flex.utils.PointUtils;
+	import org.apache.flex.utils.UIUtils;
+	
+    
+	/**
+	 *  The SingleSelectionDataGridDropTargetBead enables items to be dropped onto single-selection
DataGrid
+	 *  components. This bead can be used with SingleSelectionDragSourceBead to enable the re-arrangement
+	 *  of rows within the same list.
+     *  
+	 *  @see org.apache.flex.html.beads.SingleSelectionDropTargetBead
+     *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.8
+	 */
+	public class SingleSelectionDataGridDropTargetBead extends SingleSelectionDropTargetBead
+	{
+		/**
+		 * Constructor
+	     *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.8
+		 */
+		public function SingleSelectionDataGridDropTargetBead()
+		{
+			super();
+		}
+		
+		private var _strand:IStrand;
+		private var _dropIndicator:UIBase;
+		
+		/**
+		 * @private
+		 */
+		override public function set strand(value:IStrand):void
+		{
+			super.strand = value;
+			_strand = value;
+		}
+		
+		/**
+		 * @private
+		 */
+		override protected function getDropIndicator(ir:Object, width:Number, height:Number):UIBase
+		{
+			if (_dropIndicator == null) {
+				var bead:SingleSelectionDropIndicatorBead = _strand.getBeadByType(SingleSelectionDropIndicatorBead)
as SingleSelectionDropIndicatorBead;
+				if (bead == null) return null;
+				
+				_dropIndicator = bead.getDropIndicator(ir, width, height);
+			}
+			if (indicatorParent == null) {
+				indicatorParent = findListContainer(_strand as UIBase);
+			}
+			return _dropIndicator;
+		}
+		
+		private function findListContainer(object:UIBase):UIBase
+		{
+			const cname:String = "opt_org-apache-flex-html-DataGrid_ListArea";
+			
+			if (object == null) return null;
+			if (object.className == cname) return object;
+			var n:Number = object.numElements;
+			for (var i:int=0; i < n; i++) {
+				var result:UIBase = findListContainer(object.getElementAt(i) as UIBase);
+				if (result != null) return result;
+			}
+			return null;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/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 aaab245..8b4e1f1 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,8 +120,8 @@ package org.apache.flex.html.beads
 			trace("SingleSelectionDragSourceBead received the DragStart");
 						
 			DragEvent.dragInitiator = this;
-			DragMouseController.dragImageOffsetX = -5;
-			DragMouseController.dragImageOffsetY = -5;
+			DragMouseController.dragImageOffsetX = 0;
+			DragMouseController.dragImageOffsetY = -30;
 			
 			var startHere:Object = event.target;
 			while( !(startHere is DataItemRenderer) && startHere != null) {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropTargetBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropTargetBead.as
b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropTargetBead.as
index fcf8ec4..7fe8562 100644
--- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropTargetBead.as
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/SingleSelectionDropTargetBead.as
@@ -71,6 +71,7 @@ package org.apache.flex.html.beads
 		private var _dropIndicator:UIBase;
 		private var lastItemVisited:Object;
 		private var indicatorVisible:Boolean = false;
+		protected var indicatorParent:UIBase;
 		
 		/**
 		 * @private
@@ -83,6 +84,14 @@ package org.apache.flex.html.beads
 				
 				_dropIndicator = bead.getDropIndicator(ir, width, height);
 			}
+			if (indicatorParent == null) {
+				COMPILE::SWF {
+					indicatorParent = _strand.getBeadByType(IItemRendererParent) as UIBase;
+				}
+				COMPILE::JS {
+					indicatorParent = _strand as UIBase;
+				}
+			}
 			return _dropIndicator;
 		}
 		
@@ -122,18 +131,19 @@ package org.apache.flex.html.beads
 			}
 			
 			if (lastItemVisited && !indicatorVisible) {
-				var host:UIBase = UIUtils.findPopUpHost(_strand as UIBase) as UIBase;
-				var orgPoint:Point = new Point((lastItemVisited as UIBase).x, (lastItemVisited as UIBase).y);
-				var pt1:Point = PointUtils.localToGlobal(orgPoint, lastItemVisited.parent);
-				var pt2:Point = PointUtils.globalToLocal(pt1, host);
-				indicatorVisible = true;
 				var di:UIBase = getDropIndicator(lastItemVisited, (_strand as UIBase).width, 4);
+				var pt2:Point = new Point((lastItemVisited as UIBase).x, (lastItemVisited as UIBase).y);
+				indicatorVisible = true;
 				di.x = pt2.x;
 				di.y = pt2.y;
 				
 				trace("=== over item "+(lastItemVisited as DataItemRenderer).data.toString()+", at "+pt2.x+",
"+pt2.y);
 				
-				if (_dropIndicator) host.addElement(di);
+				if (indicatorParent != null) {
+					indicatorParent.addElement(di);
+//				} else {
+//					if (_dropIndicator) host.addElement(di);
+				}
 			}
 			
 		}
@@ -147,7 +157,10 @@ package org.apache.flex.html.beads
 			
 			if (indicatorVisible) {
 				var host:UIBase = UIUtils.findPopUpHost(_strand as UIBase) as UIBase;
-				if (_dropIndicator) host.removeElement(_dropIndicator);
+				if (indicatorParent != null) {
+					indicatorParent.removeElement(_dropIndicator);
+				}
+//				else if (_dropIndicator) host.removeElement(_dropIndicator);
 				indicatorVisible = false;
 			}
 		}
@@ -164,29 +177,17 @@ package org.apache.flex.html.beads
 				startHere = startHere.parent;
 			}
 			if ((startHere is DataItemRenderer) && _dropIndicator != null) {
-				var host:UIBase = UIUtils.findPopUpHost(_strand as UIBase) as UIBase;
-				var orgPoint:Point = new Point((startHere as UIBase).x, (startHere as UIBase).y);
-				var pt1:Point = PointUtils.localToGlobal(orgPoint, startHere.parent);
-				var pt2:Point = PointUtils.globalToLocal(pt1, host);
+				var pt2:Point = new Point((startHere as UIBase).x, (startHere as UIBase).y);
 				_dropIndicator.x = pt2.x;
 				_dropIndicator.y = pt2.y - 1;
 				
 				lastItemVisited = startHere;
 				
-				trace("== over item "+(startHere as DataItemRenderer).data.toString()+", at "+pt2.x+",
"+pt2.y);
-			} else if (lastItemVisited && _dropIndicator != null) {
-				trace("== beyond last item");
-				
-				var p:UIBase = (lastItemVisited as UIBase).parent as UIBase;
-				if (p == null) return;
-				
-				var n:int = p.numElements;
-				var lastItem:UIBase = p.getElementAt(n-1) as UIBase;
-				
-				host = UIUtils.findPopUpHost(_strand as UIBase) as UIBase;
-				orgPoint = new Point(lastItem.x, lastItem.y);
-				pt1 = PointUtils.localToGlobal(orgPoint, p);
-				pt2 = PointUtils.globalToLocal(pt1, host);
+			} 
+			else if (lastItemVisited && _dropIndicator != null) {
+				var lastItem:UIBase = lastItemVisited as UIBase;
+
+				pt2 = new Point(lastItem.x, lastItem.y);
 				_dropIndicator.x = pt2.x;
 				_dropIndicator.y = pt2.y + lastItem.height + 1;
 			}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/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 fc6b07a..869f031 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
@@ -37,6 +37,7 @@ package org.apache.flex.html.beads.controllers
 	import org.apache.flex.geom.Point;
 	import org.apache.flex.utils.PointUtils;
 	import org.apache.flex.utils.UIUtils;
+	import org.apache.flex.css2.Cursors;
 	
     /**
      *  Indicates that a drag/drop operation is starting.
@@ -216,7 +217,7 @@ package org.apache.flex.html.beads.controllers
                     dragEvent = DragEvent.createDragEvent("dragStart", event);
 					dragEvent.clientX = mouseDownX;
 					dragEvent.clientY = mouseDownY;
-					trace("DRAG-MOUSE: sending dragStart via "+event.target.toString());
+					trace("DRAG-MOUSE: sending dragStart via "+event.target.toString()+" == "+dragImageOffsetX);
 					DragEvent.dispatchDragEvent(dragEvent, event.target);
 					dispatchEvent(dragEvent);
 					
@@ -242,7 +243,7 @@ package org.apache.flex.html.beads.controllers
             }
             else
             {
-                trace("DRAG-MOUSE: sending dragMove via " + event.target.toString());
+                trace("DRAG-MOUSE: sending dragMove via " + event.target.toString()+" ==
"+dragImageOffsetX);
                 dragEvent = DragEvent.createDragEvent("dragMove", event);
                 pt = PointUtils.globalToLocal(new Point(event.clientX, event.clientY), host);
                 dragImage.x = pt.x + dragImageOffsetX;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml b/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
index ba07658..8489785 100644
--- a/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
@@ -27,5 +27,7 @@
 	<component id="SingleSelectionDropTargetBead" class="org.apache.flex.html.beads.SingleSelectionDropTargetBead"
/>
     <component id="DragMouseController" class="org.apache.flex.html.beads.controllers.DragMouseController"
/>
     <component id="DropMouseController" class="org.apache.flex.html.beads.controllers.DropMouseController"
/>
+    
+	<component id="SingleSelectionDataGridDropTargetBead" class="org.apache.flex.html.beads.SingleSelectionDataGridDropTargetBead"
/>
 
 </componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/frameworks/projects/Express/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Express/pom.xml b/frameworks/projects/Express/pom.xml
index c25a04b..6ea9cfe 100644
--- a/frameworks/projects/Express/pom.xml
+++ b/frameworks/projects/Express/pom.xml
@@ -139,6 +139,20 @@
       <type>swc</type>
       <classifier>js</classifier>
     </dependency>
+    <dependency>
+        <groupId>org.apache.flex.flexjs.framework</groupId>
+        <artifactId>DragDrop</artifactId>
+        <version>0.9.0-SNAPSHOT</version>
+        <type>swc</type>
+        <classifier>swf</classifier>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.flex.flexjs.framework</groupId>
+        <artifactId>DragDrop</artifactId>
+        <version>0.9.0-SNAPSHOT</version>
+        <type>swc</type>
+        <classifier>js</classifier>
+    </dependency>
   </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/frameworks/projects/Express/src/main/config/compile-swf-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Express/src/main/config/compile-swf-config.xml b/frameworks/projects/Express/src/main/config/compile-swf-config.xml
index d6743a0..1e90b48 100644
--- a/frameworks/projects/Express/src/main/config/compile-swf-config.xml
+++ b/frameworks/projects/Express/src/main/config/compile-swf-config.xml
@@ -35,6 +35,7 @@
             <path-element>../../../../../libs/Graphics.swc</path-element>
             <path-element>../../../../../libs/Collections.swc</path-element>
             <path-element>../../../../../libs/Basic.swc</path-element>
+            <path-element>../../../../../libs/DragDrop.swc</path-element>
         </external-library-path>
         
         <allow-subclass-overrides>true</allow-subclass-overrides>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bdc62464/frameworks/projects/Express/src/main/flex/org/apache/flex/express/List.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Express/src/main/flex/org/apache/flex/express/List.as b/frameworks/projects/Express/src/main/flex/org/apache/flex/express/List.as
index af4e97b..530d27a 100644
--- a/frameworks/projects/Express/src/main/flex/org/apache/flex/express/List.as
+++ b/frameworks/projects/Express/src/main/flex/org/apache/flex/express/List.as
@@ -26,6 +26,10 @@ package org.apache.flex.express
 	import org.apache.flex.html.beads.DataItemRendererFactoryForArrayList;
 	import org.apache.flex.html.beads.models.ArrayListSelectionModel;
 	import org.apache.flex.html.beads.models.ArraySelectionModel;
+	import org.apache.flex.html.beads.SingleSelectionDragSourceBead;
+	import org.apache.flex.html.beads.SingleSelectionDragImageBead;
+	import org.apache.flex.html.beads.SingleSelectionDropTargetBead;
+	import org.apache.flex.html.beads.SingleSelectionDropIndicatorBead;
 	
 	public class List extends org.apache.flex.html.List
 	{
@@ -34,6 +38,40 @@ package org.apache.flex.express
 			super();
 		}
 		
+		private var _dragEnabled:Boolean = false;
+		public function get dragEnabled():Boolean
+		{
+			return _dragEnabled;
+		}
+		public function set dragEnabled(value:Boolean):void
+		{
+			_dragEnabled = value;
+		}
+		
+		private var _dropEnabled:Boolean = false;
+		public function get dropEnabled():Boolean
+		{
+			return _dropEnabled;
+		}
+		public function set dropEnabled(value:Boolean):void
+		{
+			_dropEnabled = value;
+		}
+		
+		override public function addedToParent():void
+		{
+			super.addedToParent();
+			
+			if (dragEnabled) {
+				addBead(new SingleSelectionDragSourceBead());
+				addBead(new SingleSelectionDragImageBead());
+			}
+			if (dropEnabled) {
+				addBead(new SingleSelectionDropTargetBead());
+				addBead(new SingleSelectionDropIndicatorBead());
+			}
+		}
+		
 		override public function set dataProvider(value:Object):void
 		{			
 			if (value is Array) {


Mime
View raw message