Commit d2d850ca authored by Alban Seurat's avatar Alban Seurat

Update rzslider.js

Bug when use with other drag&drop framework, specify an event handler with specific type allow to not destroy other general purpose "onmouse" event handler (jquery-ui)
parent 613bc500
...@@ -784,13 +784,13 @@ function throttle(func, wait, options) { ...@@ -784,13 +784,13 @@ function throttle(func, wait, options) {
if(event.touches) if(event.touches)
{ {
$document.on('touchmove', angular.bind(this, this.onMove, pointer)); $document.on('touchmove.rzslider', angular.bind(this, this.onMove, pointer));
$document.on('touchend', angular.bind(this, this.onEnd)); $document.on('touchend.rzslider', angular.bind(this, this.onEnd));
} }
else else
{ {
$document.on('mousemove', angular.bind(this, this.onMove, pointer)); $document.on('mousemove.rzslider', angular.bind(this, this.onMove, pointer));
$document.on('mouseup', angular.bind(this, this.onEnd)); $document.on('mouseup.rzslider', angular.bind(this, this.onEnd));
} }
}, },
...@@ -876,13 +876,13 @@ function throttle(func, wait, options) { ...@@ -876,13 +876,13 @@ function throttle(func, wait, options) {
if(event.touches) if(event.touches)
{ {
$document.unbind('touchmove'); $document.unbind('touchmove.rzslider');
$document.unbind('touchend'); $document.unbind('touchend.rzslider');
} }
else else
{ {
$document.unbind('mousemove'); $document.unbind('mousemove.rzslider');
$document.unbind('mouseup'); $document.unbind('mouseup.rzslider');
} }
this.tracking = ''; this.tracking = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment