Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
I
i20rzslider
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jedife
i20rzslider
Commits
fef8c8b4
Commit
fef8c8b4
authored
Oct 15, 2015
by
Valentin Hervieu
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #153 from elifitch/configurable-interval
Configurable update interval
parents
bbe0459b
801bea79
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
7 deletions
+29
-7
README.md
README.md
+4
-0
rzslider.js
dist/rzslider.js
+11
-2
rzslider.min.css
dist/rzslider.min.css
+1
-1
rzslider.min.js
dist/rzslider.min.js
+2
-2
rzslider.js
src/rzslider.js
+11
-2
No files found.
README.md
View file @
fef8c8b4
...
...
@@ -155,6 +155,10 @@ $scope.priceSlider = {
> Disable the slider (apply a special style and unbind events)
**rz-slider-interval**
> The interval (in ms) at which the slider DOM element updates when rz-slider-model or rz-slider-high change from outside the slider. Defaults to 350.
```
javascript
// In your controller
...
...
dist/rzslider.js
View file @
fef8c8b4
...
...
@@ -232,6 +232,14 @@ function throttle(func, wait, options) {
*/
this
.
disabled
=
this
.
scope
.
rzSliderDisabled
;
/**
* The interval at which the slider updates when the model/high values
* are altered from outside the slider
*
* @type {number}
*/
this
.
interval
=
this
.
scope
.
rzSliderInterval
!==
null
?
this
.
scope
.
rzSliderInterval
:
350
;
/**
* The delta between min and max value
*
...
...
@@ -330,7 +338,7 @@ function throttle(func, wait, options) {
self
.
updateCmbLabel
();
}
},
350
,
{
leading
:
false
}
);
},
self
.
interval
);
thrHigh
=
throttle
(
function
()
{
...
...
@@ -339,7 +347,7 @@ function throttle(func, wait, options) {
self
.
updateSelectionBar
();
self
.
updateTicksScale
();
self
.
updateCmbLabel
();
},
350
,
{
leading
:
false
}
);
},
self
.
interval
);
this
.
scope
.
$on
(
'rzSliderForceRender'
,
function
()
{
...
...
@@ -1414,6 +1422,7 @@ function throttle(func, wait, options) {
rzSliderShowTicks
:
'=?'
,
rzSliderShowTicksValue
:
'=?'
,
rzSliderDisabled
:
'=?'
,
rzSliderInterval
:
'=?'
,
},
/**
...
...
dist/rzslider.min.css
View file @
fef8c8b4
/*!
jusas-angularjs-slider - v1.0.0 - (c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com>, https://github.com/rzajac/angularjs-slider.git - 2015-10-12
*/
/*!
angularjs-slider - v1.0.0 - (c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com>, https://github.com/rzajac/angularjs-slider.git - 2015-10-15
*/
rzslider
{
position
:
relative
;
display
:
inline-block
;
width
:
100%
;
height
:
4px
;
margin
:
30px
0
15px
0
;
vertical-align
:
middle
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
}
rzslider
[
disabled
]
{
cursor
:
not-allowed
}
rzslider
[
disabled
]
span
.rz-pointer
{
cursor
:
not-allowed
;
background-color
:
#d8e0f3
}
rzslider
span
{
position
:
absolute
;
display
:
inline-block
;
white-space
:
nowrap
}
rzslider
span
.rz-base
{
width
:
100%
;
height
:
100%
;
padding
:
0
}
rzslider
span
.rz-bar-wrapper
{
left
:
0
;
z-index
:
1
;
width
:
100%
;
height
:
32px
;
padding-top
:
16px
;
margin-top
:
-16px
;
box-sizing
:
border-box
}
rzslider
span
.rz-bar
{
left
:
0
;
z-index
:
1
;
width
:
100%
;
height
:
4px
;
background
:
#d8e0f3
;
-webkit-border-radius
:
2px
;
-moz-border-radius
:
2px
;
border-radius
:
2px
}
rzslider
span
.rz-bar.rz-selection
{
z-index
:
2
;
background
:
#0db9f0
;
-webkit-border-radius
:
2px
;
-moz-border-radius
:
2px
;
border-radius
:
2px
}
rzslider
span
.rz-pointer
{
top
:
-14px
;
z-index
:
3
;
width
:
32px
;
height
:
32px
;
cursor
:
pointer
;
background-color
:
#0db9f0
;
-webkit-border-radius
:
16px
;
-moz-border-radius
:
16px
;
border-radius
:
16px
}
rzslider
span
.rz-pointer
:after
{
position
:
absolute
;
top
:
12px
;
left
:
12px
;
width
:
8px
;
height
:
8px
;
background
:
#fff
;
-webkit-border-radius
:
4px
;
-moz-border-radius
:
4px
;
border-radius
:
4px
;
content
:
''
}
rzslider
span
.rz-pointer
:hover:after
{
background-color
:
#fff
}
rzslider
span
.rz-pointer.rz-active
:after
{
background-color
:
#451aff
}
rzslider
span
.rz-bubble
{
bottom
:
16px
;
padding
:
1px
3px
;
color
:
#55637d
;
cursor
:
default
}
rzslider
span
.rz-bubble.rz-selection
{
top
:
16px
}
rzslider
span
.rz-bubble.rz-limit
{
color
:
#55637d
}
rzslider
.rz-ticks
{
position
:
absolute
;
top
:
-3px
;
left
:
0
;
z-index
:
1
;
display
:
flex
;
width
:
100%
;
padding
:
0
11px
;
margin
:
0
;
list-style
:
none
;
box-sizing
:
border-box
;
justify-content
:
space-between
}
rzslider
.rz-ticks
.tick
{
width
:
10px
;
height
:
10px
;
text-align
:
center
;
cursor
:
pointer
;
background
:
#d8e0f3
;
border-radius
:
50%
}
rzslider
.rz-ticks
.tick.selected
{
background
:
#0db9f0
}
rzslider
.rz-ticks
.tick
.tick-value
{
position
:
absolute
;
top
:
-30px
;
transform
:
translate
(
-50%
,
0
)}
\ No newline at end of file
dist/rzslider.min.js
View file @
fef8c8b4
This diff is collapsed.
Click to expand it.
src/rzslider.js
View file @
fef8c8b4
...
...
@@ -232,6 +232,14 @@ function throttle(func, wait, options) {
*/
this
.
disabled
=
this
.
scope
.
rzSliderDisabled
;
/**
* The interval at which the slider updates when the model/high values
* are altered from outside the slider
*
* @type {number}
*/
this
.
interval
=
this
.
scope
.
rzSliderInterval
!==
null
?
this
.
scope
.
rzSliderInterval
:
350
;
/**
* The delta between min and max value
*
...
...
@@ -330,7 +338,7 @@ function throttle(func, wait, options) {
self
.
updateCmbLabel
();
}
},
350
,
{
leading
:
false
}
);
},
self
.
interval
);
thrHigh
=
throttle
(
function
()
{
...
...
@@ -339,7 +347,7 @@ function throttle(func, wait, options) {
self
.
updateSelectionBar
();
self
.
updateTicksScale
();
self
.
updateCmbLabel
();
},
350
,
{
leading
:
false
}
);
},
self
.
interval
);
this
.
scope
.
$on
(
'rzSliderForceRender'
,
function
()
{
...
...
@@ -1414,6 +1422,7 @@ function throttle(func, wait, options) {
rzSliderShowTicks
:
'=?'
,
rzSliderShowTicksValue
:
'=?'
,
rzSliderDisabled
:
'=?'
,
rzSliderInterval
:
'=?'
,
},
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment