From dfc8d42e85df47620ad0f578e52b4682b04aa261 Mon Sep 17 00:00:00 2001 From: marcojakob Date: Fri, 28 Jun 2013 14:06:43 +0200 Subject: [PATCH] Preparing v0.3.2 --- CHANGELOG.md | 12 +++++++++++- README.md | 15 +++++++++++---- pubspec.yaml | 2 +- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae005de..e91a316 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. \ No newline at end of file +* 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. \ No newline at end of file diff --git a/README.md b/README.md index 88272da..6fb91b9 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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`: diff --git a/pubspec.yaml b/pubspec.yaml index 8f67915..af470b6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: html5_dnd -version: 0.3.1 +version: 0.3.2 author: Marco Jakob description: HTML5 Drag and Drop homepage: https://github.com/marcojakob/dart-html5-dnd