DnD: There should be option for "copy-only" mode
For now all nodes that we are trying to drag are "moveable" nodes by default, I mean that these nodes are removed from parent on drop. User has to press dojo.dnd2.multiSelectKey to do a copy of a node, there are situations when user shouldn't be able to move a node, only to copy a node.
It would be good to make it possible to set container as a copy-only container.
For example:
var source = new dojo.dnd2.Source(node, { copyOnly: true });
and modify onMouseMove method:
m.startDrag(this, this.getSelectedNodes(), this.copyOnly || dojo.dnd2.multiSelectKey(e));
Change History (7)
Milestone: |
0.9beta →
0.9
|
Owner: |
changed from psowden to Eugene Lazutkin
|
Summary: |
DnD2: There should be option for "copy-only" mode →
DnD: There should be option for "copy-only" mode
|
Resolution: |
→ fixed
|
Status: |
assigned →
closed
|
Note: Being copyable is a function of a source. One way to do it is to provide a flag like suggested in the ticket. The other way is to provide a callback, so it can be queried dynamically and can be overwritten by the user. Probably that's how I'll implement it.