You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2019/12/11 10:32:33 UTC

[royale-asjs] branch develop updated: Show drag out of application bead

This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 35b5131  Show drag out of application bead
35b5131 is described below

commit 35b51315ff2f26b280914c6b768dce83a16df7fe
Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
AuthorDate: Wed Dec 11 12:32:15 2019 +0200

    Show drag out of application bead
---
 .../src/main/royale/MultiDragAndDropExample.mxml   | 47 ++++++++++++++++------
 1 file changed, 34 insertions(+), 13 deletions(-)

diff --git a/examples/royale/MultiDragDropExample/src/main/royale/MultiDragAndDropExample.mxml b/examples/royale/MultiDragDropExample/src/main/royale/MultiDragAndDropExample.mxml
index 7879704..f94f62c 100644
--- a/examples/royale/MultiDragDropExample/src/main/royale/MultiDragAndDropExample.mxml
+++ b/examples/royale/MultiDragDropExample/src/main/royale/MultiDragAndDropExample.mxml
@@ -53,27 +53,48 @@
 			dp.push("Item 22");
 			myList1.dataProvider = dp;
 			myList2.dataProvider = [];
+			myList3.dataProvider = [];
+			outOfApplicationBead.addEventListener("drop", dropHandler);
 		}
+
+		private function dropHandler(e:Event):void
+		{
+			myList3.dataProvider = DragEvent.dragSource as Array;
+		}
+
 		]]>
 	</fx:Script>
 	<js:valuesImpl>
 		<js:SimpleCSSValuesImpl />
 	</js:valuesImpl>
+	<js:beads>
+		<js:OutOfApplicationDropTargetBead id="outOfApplicationBead"/>
+	</js:beads>
 	<js:initialView>
 		<js:View>
-			<js:HContainer width="1200">
-				<js:MultiSelectionList id="myList1" width="600" height="400">
-					<js:beads>
-						<js:MultiSelectionDragSourceBead dragType="move" />
-						<js:MultiSelectionDragImageBead />
-					</js:beads>
-				</js:MultiSelectionList>
-				<js:MultiSelectionList id="myList2" width="600" height="400">
-					<js:beads>
-						<js:SensitiveMultiSelectionDropTargetBead />
-						<js:SingleSelectionDropIndicatorBead />
-					</js:beads>
-				</js:MultiSelectionList>
+			<js:HContainer width="1800">
+				<js:VContainer width="400" height="320">
+					<js:Label text="Drag From Here" height="20"/>
+					<js:MultiSelectionList id="myList1" width="400" height="300">
+						<js:beads>
+							<js:MultiSelectionDragSourceBead dragType="move" />
+							<js:MultiSelectionDragImageBead />
+						</js:beads>
+					</js:MultiSelectionList>
+				</js:VContainer>
+				<js:VContainer width="400" height="320">
+					<js:Label text="Drop here" height="20"/>
+					<js:MultiSelectionList id="myList2" width="400" height="300">
+						<js:beads>
+							<js:SensitiveMultiSelectionDropTargetBead />
+							<js:SingleSelectionDropIndicatorBead />
+						</js:beads>
+					</js:MultiSelectionList>
+				</js:VContainer>
+				<js:VContainer width="400" height="320">
+					<js:Label height="20" text="Or drop out of application"/>
+					<js:List id="myList3" width="400" height="300"/>
+				</js:VContainer>
 			</js:HContainer>
 		</js:View>
 	</js:initialView>