Skip to content

Commit c7d8791

Browse files
committed
update README
1 parent 45b8bfc commit c7d8791

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
polymer-sortablejs
22
-------------------
3+
34
A Polymer binding to [SortableJS](https://github.com/RubaXa/Sortable/).
45

56
Demo: http://rubaxa.github.io/Sortable/
67

7-
8-
<a name="polymer"></a>
9-
### Support Polymer
8+
### Usage
109

1110
```html
1211

13-
<link rel="import" href="path/to/polymer-sortablejs/polymer-sortablejs.html"/>
12+
<link rel="import" href="bower_components/polymer-sortablejs.html"/>
1413

15-
<sortable-js handle=".handle">
16-
<template is="dom-repeat" items={{names}}>
14+
<sortable-js>
15+
<template is="dom-repeat" items={{items}}>
1716
<div>{{item}}</div>
1817
</template>
1918
</sortable-js>
2019
```
2120

21+
### Install
2222

23-
### NPM
24-
25-
`npm install polymer-sortablejs`
23+
```
24+
$ bower install SortableJS/polymer-sortablejs
25+
```

polymer-sortablejs.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,14 @@
7878
var eventCallbacks = {
7979
onUpdate: function (e) {
8080
if (template) {
81-
if(manuallyHandleUpdateEvents) {
81+
template.splice("items", e.newIndex, 0, template.splice("items", e.oldIndex, 1)[0]);
82+
/*
83+
if (manuallyHandleUpdateEvents) {
8284
template.items.splice(e.newIndex, 0, template.items.splice(e.oldIndex, 1)[0]);
8385
} else {
8486
template.splice("items", e.newIndex, 0, template.splice("items", e.oldIndex, 1)[0]);
8587
}
88+
*/
8689
}
8790
_this.fire("update", e);
8891
},

0 commit comments

Comments
 (0)