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

Skip to content

Commit 2d224dd

Browse files
author
Valentin Hervieu
committed
chore(coverage): ignore useless lines not directly related to the slider
1 parent 2e3cdbe commit 2d224dd

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

dist/rzslider.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/*global angular: false, console: false, define, module */
77
(function(root, factory) {
88
'use strict';
9+
/* istanbul ignore next */
910
if (typeof define === 'function' && define.amd) {
1011
// AMD. Register as an anonymous module.
1112
define(['angular'], factory);
@@ -90,6 +91,7 @@
9091
*/
9192
return function(func, wait, options) {
9293
'use strict';
94+
/* istanbul ignore next */
9395
var getTime = (Date.now || function() {
9496
return new Date().getTime();
9597
});
@@ -98,16 +100,13 @@
98100
var previous = 0;
99101
options = options || {};
100102
var later = function() {
101-
previous = options.leading === false ? 0 : getTime();
103+
previous = getTime();
102104
timeout = null;
103105
result = func.apply(context, args);
104106
context = args = null;
105107
};
106108
return function() {
107109
var now = getTime();
108-
if (!previous && options.leading === false) {
109-
previous = now;
110-
}
111110
var remaining = wait - (now - previous);
112111
context = this;
113112
args = arguments;
@@ -209,7 +208,7 @@
209208
*
210209
* @type {number}
211210
*/
212-
this.step = 0;
211+
this.step = 1;
213212

214213
/**
215214
* The name of the handle we are currently tracking
@@ -731,7 +730,6 @@
731730
*/
732731
updateTicksScale: function() {
733732
if (!this.options.showTicks) return;
734-
if (!this.step) return; //if step is 0, we'll get a zero division
735733

736734
var positions = '',
737735
ticksCount = Math.round((this.maxValue - this.minValue) / this.step) + 1;

0 commit comments

Comments
 (0)