• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

adapter/H03-May-2022-

dropMode/H03-May-2022-

resources/H11-Nov-2020-9089

READMEH A D11-Nov-20202.6 KiB9572

README

1-------------------------------------------------------------------------------
2dojox.mdnd Experimental coordinates based moveable drag and drop.
3-------------------------------------------------------------------------------
4Version 1.1
5Release date: 09/04/2009
6-------------------------------------------------------------------------------
7Project 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-------------------------------------------------------------------------------
20Credits
21
22Erwan Morvillez (emorvillez),
23Jean-Jacques Patard (jjpatard),
24Jeff Cunat (jfcunat)
25
26
27-------------------------------------------------------------------------------
28Project description
29
30Alternative Drag and Drop solution based on coordinates of drag element and
31targets instead of mouseover. It allows dragging directly the nodes (like
32dojo.dnd.Moveable) instead of an avatar (as in dojo.dnd). dojo.dnd and
33dojox.mdnd are compatible by using adapters.
34
35PureSource is just a rewrite of dojo.dnd.Source to only allow drag start and no
36drop without testing acceptance.
37
38-------------------------------------------------------------------------------
39Dependencies
40
41	require Dojo Core
42
43-------------------------------------------------------------------------------
44Installation:
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-------------------------------------------------------------------------------
54Basic 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>
95