Browse Source

* fixed 'sort' method

pull/101/head
RubaXa 10 years ago
parent
commit
059859b1bb
  1. 7
      Sortable.js
  2. 4
      Sortable.min.js
  3. 2
      bower.json
  4. 2
      component.json
  5. 2
      index.html
  6. 2
      package.json

7
Sortable.js

@ -477,11 +477,12 @@
this.toArray().forEach(function (id, i) {
var el = rootEl.children[i];
if (_closest(rootEl, this.options.draggable, rootEl)) {
if (_closest(el, this.options.draggable, rootEl)) {
items[id] = el;
}
}, this);
order.forEach(function (id) {
if (items[id]) {
rootEl.removeChild(items[id]);
@ -652,7 +653,7 @@
* @private
*/
function _generateId(el) {
var str = el.innerHTML + el.className + el.src,
var str = el.tagName + el.className + el.src + el.href + el.textContent,
i = str.length,
sum = 0
;
@ -679,7 +680,7 @@
};
Sortable.version = '0.5.0';
Sortable.version = '0.5.1';
// Export

4
Sortable.min.js vendored

File diff suppressed because one or more lines are too long

2
bower.json

@ -1,7 +1,7 @@
{
"name": "Sortable",
"main": "Sortable.js",
"version": "0.5.0",
"version": "0.5.1",
"homepage": "http://rubaxa.github.io/Sortable/",
"authors": [
"RubaXa <ibnRubaXa@gmail.com>"

2
component.json

@ -1,7 +1,7 @@
{
"name": "Sortable",
"main": "Sortable.js",
"version": "0.5.0",
"version": "0.5.1",
"homepage": "http://rubaxa.github.io/Sortable/",
"repo": "RubaXa/Sortable",
"authors": [

2
index.html

@ -17,7 +17,7 @@
</head>
<body>
<a href="https://github.com/RubaXa/Sortable"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;" src="//s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
<a href="https://github.com/RubaXa/Sortable"><img style="position: fixed; top: 0; right: 0; border: 0; z-index: 10000;" src="//s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
<div class="container">
<div style="padding: 80px 150px 0; height: 160px;">

2
package.json

@ -1,7 +1,7 @@
{
"name": "sortable",
"exportName": "Sortable",
"version": "0.5.0",
"version": "0.5.1",
"devDependencies": {
"grunt": "*",
"grunt-version": "*",

Loading…
Cancel
Save