Skip to content

Commit

Permalink
Add a sortable example
Browse files Browse the repository at this point in the history
  • Loading branch information
marcojakob committed Oct 20, 2014
1 parent d8bdb6d commit aa7d3fd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Version 0.1.4 (2014-10-20)

* Add a sortable example.
* Change comments according to new Dart Style Guide rule
(`///` instead of `/** */`).
* Move event dispatching calls from EventManager to Draggable (refactoring).


## Version 0.1.3 (2014-08-09)

* Fix #4: Problem when an ancestor of the dragged element was positioned
Expand Down
2 changes: 1 addition & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1>Dart Drag and Drop Examples</h1>
<li><a href="horizontal-only/">Horizontal Only</a></li>
<li><a href="nested-dropzones/">Nested Dropzone</a></li>
<li><a href="nested-elements/">Nested Elements</a></li>
<li><a href="sortable-test/">Sortable Test</a></li>
<li><a href="simple-sortable/">Sortable</a></li>
</ul>
</div>
</body>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import 'dart:html';
import 'package:dnd/dnd.dart';

/**
* Just a test if we can set up [Draggable] and [Dropzone] on the same elements
* and implement some basic sortable/rarranging behavior.
*/
/// Just a test if we can set up [Draggable] and [Dropzone] on the same elements
/// and implement some basic sortable/rearranging behavior.
main() {
// Install same elements as draggable and dropzone.
Draggable draggable = new Draggable(querySelectorAll('.sortable'),
Expand All @@ -18,9 +16,7 @@ main() {
});
}

/**
* Simple function to swap two elements.
*/
/// Simple function to swap two elements.
void swapElements(Element elm1, Element elm2) {
var parent1 = elm1.parent;
var next1 = elm1.nextElementSibling;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<body>
<div class="container">

<a href="https://github.com/marcojakob/dart-dnd/tree/master/example/sortable-test"
<a href="https://github.com/marcojakob/dart-dnd/tree/master/example/simple-sortable"
target="_parent">Example Source on GitHub</a>

<div>
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: dnd
version: 0.1.3
version: 0.1.4
author: Marco Jakob <majakob@gmx.ch>
description: Drag and Drop for Dart web apps with mouse and touch support.
homepage: http://code.makery.ch/library/dart-drag-and-drop/
documentation: http://www.dartdocs.org/documentation/dnd/0.1.3/
documentation: http://www.dartdocs.org/documentation/dnd/0.1.4/
dependencies:
browser: '>=0.10.0+2 <0.11.0'

0 comments on commit aa7d3fd

Please sign in to comment.