Skip to content

Commit

Permalink
Preparing v0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
marcojakob committed Jun 28, 2013
1 parent ebbb322 commit dfc8d42
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,14 @@ Changelog
* Reorganized some parts. Now only html5_dnd.dart needs to be imported and
sortable is imported automatically. If some functionality like sortable isn't
used, Dart's treeshaking will make sure no unnecessary code is added.
* Add extended usage documentation to readme.
* Add extended usage documentation to readme.

## Version 0.3.2 (2013-06-28) ##
* Support 'cancel' query String to prevent dragging: A 'cancel' query String
may be supplied for draggables to prevent starting a drag on specific elements.
* Improve clearing of selection when drag starts.
* Fix some bugs in touch support.
* Firing sortUpdate events after dragEnd events: Firing sortUpdate at the end
makes sure that the listener of update events can uninstall/install involved
draggables without side-effects
* Add some additional test examples.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,16 @@ With `uninstall(...)` or `uninstallAll(...)` draggables can be removed from
the group and the draggable behaviour is uninstalled.

#### Draggable Options ####
The `DraggableGroup` has two constructor options:
The `DraggableGroup` has three constructor options:

* The `dragImageFunction` is used to provide a custom `DragImage`. If no
`dragImageFunction` is supplied, the drag image is created from the HTML
element of the draggable.
* If a `handle` is provided, it is used as query String to find a subelement of
draggable elements. The drag is then restricted to that subelement.
* If a `handle` is provided, it is used as query String to find subelements of
draggable elements. The drag is then restricted to those elements.
* If `cancel` is provided, it is used as query String to find a subelement of
drabbable elements. The drag is then prevented on those elements.
The default is 'input,textarea,button,select,option'.

```dart
// Create a custom drag image from a png.
Expand All @@ -99,8 +102,12 @@ DragImageFunction imageFunction = (Element draggable) {
};
// Create DraggableGroup with custom drag image and a handle.
DraggableGroup dragGroup = new DraggableGroup(
DraggableGroup dragGroupHandle = new DraggableGroup(
dragImageFunction: imageFunction, handle: '.my-handle');
// Create DraggableGroup with a cancel query String.
DraggableGroup dragGroupCancel = new DraggableGroup(
cancel: 'textarea, button, .no-drag');
```

Other options of the `DraggableGroup`:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: html5_dnd
version: 0.3.1
version: 0.3.2
author: Marco Jakob <majakob@gmx.ch>
description: HTML5 Drag and Drop
homepage: https://github.com/marcojakob/dart-html5-dnd
Expand Down

0 comments on commit dfc8d42

Please sign in to comment.