Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Releases: marceljuenemann/angular-drag-and-drop-lists

Feature release 2.1.0

15 Jan 23:55
Compare
Choose a tag to compare
  • Custom callbacks with dnd-callback: The new dnd-callback attribute allows for communication between the source and target scopes. For example, this can be used to access information about the object being dragged during dragover, or to transfer objects without serialization, which allows to use complex objects that contain functions references and prototypes. Demo
  • Drop effects fixed and extended: Most of the bugs around drop effect have been fixed. You can now use move, copy and link, or a combination of them. Drop effects can be restricted using dnd-effect-allowed on both the source and target element, and if there are multiple options, the user can choose one using modifier keys (Ctrl or Alt). See the design document for more details. Drop effects don't work on IE9. They do work accross browser tabs if dnd-external-sources is activated, although the source restrictions are lost in Safari and IE.
  • New dragleave handler: Previously, the dragleave handler used a timeout to determine whether the placeholder needs to be removed from a dnd-list. The new implementation utilizes document.elementFromPoint to determine whether the mouse cursor is outside the target list.
  • Remove dndDraggingSource without timeout: Fixes problems with ngAnimate (#121).

Major release 2.0.0

25 Dec 17:05
Compare
Choose a tag to compare

There have been some major changes to how the directive works internally, although these changes should not affect users of the library.

  • Simpler placeholder positioning algorithm: The logic for placeholder positiong is unchanged, i.e. the placeholder will be placed after an element if the mouse cursor is in the second half of the element it is hovering over, otherwise it is placed before it. However, the implementation of this algorithm was massively simplified by using getBoundingClientRect. As a result, developers are no longer required to have position: relative on the list and list item elements.
  • New dataTransfer algorithm: The directive now uses custom mime types in modern browsers, and falls back to using Text in non-standard comform browsers. As a result, dragged elements can no longer be dropped into arbitrary input fields. More details on how this works can be found in the design document.
  • Internal test infrastructure: The mocks used for drag and drop events in unit tests are now much nicer.

Feature release 1.4.0

06 Feb 15:14
Compare
Choose a tag to compare
  • dnd-handle directive: This directive can be used in combination with dnd-nodrag, so that a dnd-draggable can only be dragged by using certain handle elements. Demo
  • dnd-drop can handle insertion: The dnd-drop callback can now return true to signalize that it will take care of inserting the dropped element itself. dnd-list will then no longer insert any elements into the list, but will still call the dnd-inserted callback.
  • Fix dnd-disable-if on dnd-draggable: When you disabled a dnd-draggable with dnd-disable-if, the user was still able to trigger a drag of that element by selecting some text inside the element. (issue #159)
  • dnd-list now handles the dragenter event: According to the HTML5 standard dropzones need to handle the dragenter event, although there doesn't seem to be any browser that enforces this. (issue #118)

Feature release 1.3.0

20 Aug 23:33
Compare
Choose a tag to compare
  • New callbacks: dnd-dragend, dnd-canceled and dnd-inserted.
  • Custom placeholder elements: dnd-list elements can have custom elements by creating a child element with dnd-placeholder class. This is useful for cases where a simple li element is not sufficient.
  • dnd-nodrag directive: This directive can be used inside dnd-draggable to prevent dragging certain areas. This is useful for input elements inside the draggable or creating handle elements.
  • Fix user selection inside dnd-draggable: The selectstart event is no longer cancelled.
  • Fix click handler compatibility: Propagation of click events is now only stopped if the dnd-selected attribute is present.
  • Fix IE9 glitch: Double clicks in IE9 previously would trigger the dnd-moved callback, and therefore remove items accidentially. (issue #21)

Feature release 1.2.0

30 Nov 20:25
Compare
Choose a tag to compare
  • Fix glitches in Chrome: When aborting a drag operation or dragging an element on itself, Chrome on Linux sometimes sends move as dropEffect instead of none. This lead to elements sometimes disappearing. Can be reproduced by dragging an element over itself and aborting with Esc key. (issue #14)
  • Fix dnd-allowed-types in nested lists: When a drop was not allowed due to the wrong element type, the event was correctly propagated to the parent list. Nevertheless, the drop was still executed, because the drop handler didn't check the type again. (issue #16)
  • New callbacks: The dnd-draggable directive now has a new dnd-dragstart callback besides the existing dnd-moved and dnd-copied. The dnd-list directive got the callbacks dnd-dragover and dnd-drag added, which are also able to abort a drop. (issue #11)
  • dnd-horizontal-list: Lists can be marked as horizontal with this new attribute. The positioning algorithm then positions the placeholder left or right of other list items, instead of above or below. (issue #19)
  • dnd-external-sources: This attribute allows drag and drop accross browser windows. See documentation for details. (issue #9)
  • pointer-events: none no longer required: The dragover handler now traverses the DOM until it finds the list item node, therefore it's child elements no longer require the pointer-events: none style.

Feature release 1.1.0

31 Aug 20:48
Compare
Choose a tag to compare
  • jQuery compatibility: jQuery wraps browser events in event.originalEvent
  • dnd-disable-if attribute: allows to dynamically disable the drag and drop functionality
  • dnd-type and dnd-allowed-types: allows to restrict an item to specifc lists depending on it's type

First production-ready version

10 Apr 23:31
Compare
Choose a tag to compare
v1.0.0

Add bower file