Browse Source

* fixed #5 and #6

pull/10/head
RubaXa 11 years ago
parent
commit
682cd7effe
  1. 13
      Sortable.js
  2. 4
      Sortable.min.js
  3. 2
      package.json

13
Sortable.js

@ -119,15 +119,16 @@
touch = evt.touches && evt.touches[0]
, target = (touch || evt).target
, options = this.options
, el = this.el
;
if( options.handle ){
target = _closest(target, options.handle, this.el);
target = _closest(target, options.handle, el);
}
target = _closest(target, options.draggable, this.el);
target = _closest(target, options.draggable, el);
if( target && !dragEl ){
if( target && !dragEl && (target !== el) ){
tapEvt = evt;
target.draggable = true;
@ -397,13 +398,13 @@
var
tag = selector.shift().toUpperCase()
, re = new RegExp('\\b('+selector.join('|')+')\\b', 'g')
, re = new RegExp('\\s('+selector.join('|')+')\\s', 'g')
;
do {
if(
(tag === '' || el.nodeName == tag)
&& (!selector.length || ((el.className+'').match(re) || []).length == selector.length)
&& (!selector.length || ((' '+el.className+' ').match(re) || []).length == selector.length)
){
return el;
}
@ -498,7 +499,7 @@
};
Sortable.version = '0.1.2';
Sortable.version = '0.1.3';
// Export
return Sortable;

4
Sortable.min.js vendored

File diff suppressed because one or more lines are too long

2
package.json

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

Loading…
Cancel
Save