Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2642b8c

Browse files
author
Valentin Hervieu
committed
test(mouse events): Add first tests for mouse events handling
1 parent 2f2a28b commit 2642b8c

File tree

2 files changed

+1033
-672
lines changed

2 files changed

+1033
-672
lines changed

src/rzslider.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,9 +1182,7 @@
11821182

11831183
if (this.options.draggableRangeOnly) {
11841184
this.minH.on('mousedown', angular.bind(this, barStart, null, barTracking));
1185-
if (this.range) {
1186-
this.maxH.on('mousedown', angular.bind(this, barStart, null, barTracking));
1187-
}
1185+
this.maxH.on('mousedown', angular.bind(this, barStart, null, barTracking));
11881186
} else {
11891187
this.minH.on('mousedown', angular.bind(this, this.onStart, this.minH, 'rzSliderModel'));
11901188
if (this.range) {
@@ -1200,9 +1198,7 @@
12001198
this.selBar.on('touchstart', angular.bind(this, barMove, this.selBar));
12011199
if (this.options.draggableRangeOnly) {
12021200
this.minH.on('touchstart', angular.bind(this, barStart, null, barTracking));
1203-
if (this.range) {
1204-
this.maxH.on('touchstart', angular.bind(this, barStart, null, barTracking));
1205-
}
1201+
this.maxH.on('touchstart', angular.bind(this, barStart, null, barTracking));
12061202
} else {
12071203
this.minH.on('touchstart', angular.bind(this, this.onStart, this.minH, 'rzSliderModel'));
12081204
if (this.range) {
@@ -1284,7 +1280,6 @@
12841280
onMove: function(pointer, event) {
12851281
var newOffset = this.getEventPosition(event),
12861282
newValue;
1287-
12881283
if (newOffset <= 0) {
12891284
if (pointer.rzsp === 0)
12901285
return;

0 commit comments

Comments
 (0)