Skip to content

Commit

Permalink
Add touchMove listeners
Browse files Browse the repository at this point in the history
Add touchMove listeners for better user experience on devices with touch functions
  • Loading branch information
Mike Zheng authored Jun 14, 2017
1 parent 1ce6742 commit fdce8a3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions twitch/twitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ function respCont() {
}

$(document).ready(function() {
/*借助jQuery UI方法使得整个消息框可以在一定范围内随意拖动和改变大小,
参考http://www.runoob.com/jqueryui/example-draggable.html*/
//$("#container").draggable();
/*$("#container").resizable({
//借助jQuery UI方法使得整个消息框可以在一定范围内随意拖动和改变大小,
//参考http: //www.runoob.com/jqueryui/example-draggable.html
$("#container").draggable();
$("#container").resizable({
handles: 'n, e, w, ne, nw'
});*/
});

twListHeight();
myStatusMove();
Expand Down Expand Up @@ -255,9 +255,9 @@ $(document).ready(function() {

$(document).on("touchend", function(e) {
if (currentX) {
if (currentX - lastX > 50) {
if (currentX - lastX > 0) {
moveTo = "right";
} else if ( lastX - currentX > 50) {
} else if (currentX - lastX < 0) {
moveTo = "left";
}
}
Expand Down

0 comments on commit fdce8a3

Please sign in to comment.