()
| 267 | } |
| 268 | |
| 269 | function remove () { |
| 270 | if (!drake.dragging) { |
| 271 | return; |
| 272 | } |
| 273 | var item = _copy || _item; |
| 274 | var parent = getParent(item); |
| 275 | if (parent) { |
| 276 | parent.removeChild(item); |
| 277 | } |
| 278 | drake.emit(_copy ? 'cancel' : 'remove', item, parent, _source); |
| 279 | cleanup(); |
| 280 | } |
| 281 | |
| 282 | function cancel (revert) { |
| 283 | if (!drake.dragging) { |