root / trunk / web / dojo / dojox / mdnd / README
History | View | Annotate | Download (2.58 KB)
1 | 9 | andrej.cim | ------------------------------------------------------------------------------- |
---|---|---|---|
2 | dojox.mdnd Experimental coordinates based moveable drag and drop. |
||
3 | ------------------------------------------------------------------------------- |
||
4 | Version 1.1 |
||
5 | Release date: 09/04/2009 |
||
6 | ------------------------------------------------------------------------------- |
||
7 | Project state: |
||
8 | |||
9 | [AreaManager] beta |
||
10 | [AutoScroll] beta |
||
11 | [DropIndicator] beta |
||
12 | [Movable] beta |
||
13 | [PureSource] beta |
||
14 | [adapter/DndFromDojo] experimental |
||
15 | [adapter/DndToDojo] experimental |
||
16 | [dropMode/DefaultDropMode] beta |
||
17 | [dropMode/OverDropMode] experimental |
||
18 | |||
19 | ------------------------------------------------------------------------------- |
||
20 | Credits |
||
21 | |||
22 | Erwan Morvillez (emorvillez), |
||
23 | Jean-Jacques Patard (jjpatard), |
||
24 | Jeff Cunat (jfcunat) |
||
25 | |||
26 | |||
27 | ------------------------------------------------------------------------------- |
||
28 | Project description |
||
29 | |||
30 | Alternative Drag and Drop solution based on coordinates of drag element and |
||
31 | targets instead of mouseover. It allows dragging directly the nodes (like |
||
32 | dojo.dnd.Moveable) instead of an avatar (as in dojo.dnd). dojo.dnd and |
||
33 | dojox.mdnd are compatible by using adapters. |
||
34 | |||
35 | PureSource is just a rewrite of dojo.dnd.Source to only allow drag start and no |
||
36 | drop without testing acceptance. |
||
37 | |||
38 | ------------------------------------------------------------------------------- |
||
39 | Dependencies |
||
40 | |||
41 | require Dojo Core |
||
42 | |||
43 | ------------------------------------------------------------------------------- |
||
44 | Installation: |
||
45 | |||
46 | checkout: |
||
47 | |||
48 | http://svn.dojotoolkit.org/src/dojox/trunk/mdnd/ |
||
49 | |||
50 | and require via: |
||
51 | dojo.require("dojox.mdnd.AreaManager"); |
||
52 | |||
53 | ------------------------------------------------------------------------------- |
||
54 | Basic Usage: |
||
55 | |||
56 | dojo.require("dojox.mdnd.AreaManager"); |
||
57 | dojo.require("dojox.mdnd.DropIndicator"); |
||
58 | dojo.require("dojox.mdnd.dropMode.DefaultDropMode"); |
||
59 | |||
60 | var init = function(){ |
||
61 | var m = dojox.mdnd.areaManager(); |
||
62 | m.areaClass = "dndArea"; |
||
63 | m.dragHandleClass = "dragHandle"; |
||
64 | m.registerByClass(); |
||
65 | }; |
||
66 | |||
67 | dojo.addOnLoad(init); |
||
68 | |||
69 | ... |
||
70 | |||
71 | <div style="position:absolute; top:80px; left:50px;"> |
||
72 | <h2>Accepts Type1 items</h2> |
||
73 | <div class="dndArea container" accept="type1"> |
||
74 | <div class="dndItem" dndType="type1"> |
||
75 | <div class="dragHandle">Item Type 1</div> |
||
76 | <div> |
||
77 | <p>Proin aliquet accumsan nunc. Duis nec tortor.</p> |
||
78 | |||
79 | </div> |
||
80 | </div> |
||
81 | <div class="dndItem simpleBlock" dndType="type2"> |
||
82 | <div class="dragHandle">Item Type2</div> |
||
83 | <div> |
||
84 | <p>Proin aliquet accumsan nunc. Duis nec tortor.</p> |
||
85 | </div> |
||
86 | </div> |
||
87 | |||
88 | </div> |
||
89 | |||
90 | <div style="position:absolute; top:80px; left:350px;"> |
||
91 | <h2>Accepts Type2 items</h2> |
||
92 | <div class="dndArea container" accept="type2"> |
||
93 | </div> |
||
94 | </div> |