Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7051 closed enhancement (fixed)

DnD: introduce selfCopy flag

Reported by: Eugene Lazutkin Owned by: Eugene Lazutkin
Priority: high Milestone: 1.2
Component: DnD Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:

Description

Presently there is copyOnly flag, which forces items to be copied always. Users (including Revin Guillen) ask for more complex behavior: copy should be forced only when source != target. For self-drops it should be able to move (rearrange) items by default.

In order to to accomplish that we will introduce selfCopy flag:

  • When true, all self-drops copy items like the current behavior.
  • When false, all self-drops move/rearrange items. This behavior can be overridden by keyboard (by pressing Ctrl or Meta key).

By default this flag is false.

Change History (3)

comment:1 Changed 11 years ago by dante

another thing to think of: it seems terribly difficult to prevent a copyOnly="true" from being able to self-populate (copy and drop into own source). A common use case is to drag from a source to a target but prevent self-dropping. Revin has a workaround in his blog post, but it seems like it would be a trivial thing to introduce into DnD natively. sourceOnly or something?

this is not a full feature request, just something to consider.

comment:2 Changed 11 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

(In [14152]) DnD: adding selfCopy flag. Thx, Revin Guillen! Fixes #7051. !strict

comment:3 Changed 11 years ago by Eugene Lazutkin

(In [14158]) DnD: adding selfAccept for copyOnly sources, thx, Revin Guillen! Refs #7051. !strict

Note: See TracTickets for help on using tickets.