Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/.sass-cache
/build
/.bundle

.ruby-gemset
.ruby-version

# tempfiles
*[~#]
Expand Down
2 changes: 2 additions & 0 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ jquery (>= 1.7.0)

jQuery Sortable is developed using [middleman](http://middlemanapp.com/).
A **bundle install** shoud pull in everything needed.
bundle exec middleman server
This will start a local web server running at: http://localhost:4567/
12 changes: 6 additions & 6 deletions source/js/jquery-sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
right:0
},
eventNames = {
start: "touchstart.sortable mousedown.sortable",
start: "touchmove.sortable mousedown.sortable",
drop: "touchend.sortable touchcancel.sortable mouseup.sortable",
drag: "touchmove.sortable mousemove.sortable",
scroll: "scroll.sortable"
Expand Down Expand Up @@ -268,8 +268,8 @@
groupDefaults.onDrag,
e)

var x = e.pageX || e.originalEvent.pageX,
y = e.pageY || e.originalEvent.pageY,
var x = e.pageX || e.originalEvent.targetTouches[0].pageX,
y = e.pageY || e.originalEvent.targetTouches[0].pageY,
box = this.sameResultBox,
t = this.options.tolerance

Expand Down Expand Up @@ -390,8 +390,8 @@
},
getPointer: function(e) {
return {
left: e.pageX || e.originalEvent.pageX,
top: e.pageY || e.originalEvent.pageY
left: e.pageX || e.originalEvent.targetTouches[0].pageX,
top: e.pageY || e.originalEvent.targetTouches[0].pageY
}
},
setupDelayTimer: function () {
Expand Down Expand Up @@ -472,7 +472,7 @@
},
isValidDrag: function(e) {
return e.which == 1 ||
e.type == "touchstart" && e.originalEvent.touches.length == 1
e.type == "touchmove" && e.originalEvent.touches.length == 1
},
searchValidTarget: function (pointer, lastPointer) {
var distances = sortByDistanceDesc(this.getItemDimensions(),
Expand Down