diff -r 000000000000 -r 40c8f766c9b8 src/cm/media/js/lib/yui/yui_3.0.0b1/examples/dd/groups-drag.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui_3.0.0b1/examples/dd/groups-drag.html Mon Nov 23 15:14:29 2009 +0100 @@ -0,0 +1,552 @@ + + + + + YUI Library Examples: Drag & Drop: Interaction Groups + + + + + + + + + + + + + + +
+
+
+

+ + YUI 3.x Home - + +

+
+ + +
+ + + +
+
+
+
+

YUI Library Examples: Drag & Drop: Interaction Groups

+
+
+ +

Note: This is YUI 3.x. Looking for YUI 2.x?

+ +
+
+
+
+ +

Drag & Drop: Interaction Groups

+ +
+

+

Using interaction groups, this example demonstrates how to tie into the Drag & Drop Utility's interesting moments to provide visual affordances for the current drag operation.

+

+ +
+
+ + + + + + +
+ +
1
+
3
+
4
+
5
+
6
+
2
+ + +
1
+
2
+
3
+
4
+
5
+
6
+ +
+ + + + + + + +
+
+
+ +

Setting up the Work Area

+

First we need to create the work area, players (drags) and slots (drops).

+ +

Now we give them some CSS to make them visible.

+ + +

Setting up the YUI Instance

+

Now we need to create our YUI instance and tell it to load the dd-drop, dd-proxy and dd-constrain modules.

+ + +

Setting up the Drop Targets

+

Now that we have a YUI instance with the requested modules, we are going to create our Drop Targets.

+ + +

Setting up the Drag Nodes

+

Now we need to create the Drag Nodes and assign them to the proper group.

+ +

Handling the Drops and Moments

+

Now we are going to listen for Four Drag Events: drag:start, drag:end, drag:drophit, drag:dropmiss

+ + +

Full Javascript Code

+ +
+ +
+ +
+
+ + + +
+ +
+

Copyright © 2009 Yahoo! Inc. All rights reserved.

+

Privacy Policy - + Terms of Service - + Copyright Policy - + Job Openings

+
+
+ + + +