Commit 2ced6452 authored by Rafal Zajac's avatar Rafal Zajac

Update to latest version

parent ad40ba03
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
* (c) Rafal Zajac <rzajac@gmail.com> * (c) Rafal Zajac <rzajac@gmail.com>
* http://github.com/rzajac/angularjs-slider * http://github.com/rzajac/angularjs-slider
* *
* Version: v0.1.14 * Version: v0.1.15
* *
* Licensed under the MIT license * Licensed under the MIT license
*/ */
/* global angular: false, window: false */ /* global angular: false */
angular.module('rzModule', []) angular.module('rzModule', [])
...@@ -843,13 +843,13 @@ function throttle(func, wait, options) { ...@@ -843,13 +843,13 @@ function throttle(func, wait, options) {
if(event.touches || (typeof(event.originalEvent) != 'undefined' && event.originalEvent.touches)) if(event.touches || (typeof(event.originalEvent) != 'undefined' && event.originalEvent.touches))
{ {
$document.on('touchmove', angular.bind(this, this.onMove, pointer)); this.sliderElem.on('touchmove', angular.bind(this, this.onMove, pointer));
$document.on('touchend', angular.bind(this, this.onEnd)); $document.one('touchend', angular.bind(this, this.onEnd));
} }
else else
{ {
$document.on('mousemove', angular.bind(this, this.onMove, pointer)); this.sliderElem.on('mousemove', angular.bind(this, this.onMove, pointer));
$document.on('mouseup', angular.bind(this, this.onEnd)); $document.one('mouseup', angular.bind(this, this.onEnd));
} }
}, },
...@@ -944,13 +944,11 @@ function throttle(func, wait, options) { ...@@ -944,13 +944,11 @@ function throttle(func, wait, options) {
if(event.touches || (typeof(event.originalEvent) != 'undefined' && event.originalEvent.touches)) if(event.touches || (typeof(event.originalEvent) != 'undefined' && event.originalEvent.touches))
{ {
$document.unbind('touchmove'); this.sliderElem.off('touchmove');
$document.unbind('touchend');
} }
else else
{ {
$document.unbind('mousemove'); this.sliderElem.off('mousemove');
$document.unbind('mouseup');
} }
this.scope.$emit('slideEnded'); this.scope.$emit('slideEnded');
......
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