Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
i20rzslider
Project
Project
Details
Activity
Releases
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
c6984774
Commit
c6984774
authored
Feb 06, 2016
by
Valentin Hervieu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(highLab): Fix high label positioning when size is different than the ceil one.
parent
4c55de29
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
44 additions
and
11 deletions
+44
-11
CHANGELOG.md
CHANGELOG.md
+4
-0
bower.json
bower.json
+1
-1
demo.js
demo/demo.js
+20
-0
index.html
demo/index.html
+9
-0
rzslider.css
dist/rzslider.css
+1
-1
rzslider.js
dist/rzslider.js
+3
-3
rzslider.min.css
dist/rzslider.min.css
+1
-1
rzslider.min.js
dist/rzslider.min.js
+2
-2
package.json
package.json
+1
-1
rzslider.js
src/rzslider.js
+2
-2
No files found.
CHANGELOG.md
View file @
c6984774
# 2.7.1 (2016-02-06)
## Fix
-
Fix high label positioning when size is different than the ceil one.
# 2.7.0 (2016-02-06)
# 2.7.0 (2016-02-06)
## Features
## Features
-
Add an
`enforceStep`
option (defaults to true) (#246).
-
Add an
`enforceStep`
option (defaults to true) (#246).
...
...
bower.json
View file @
c6984774
{
{
"name"
:
"angularjs-slider"
,
"name"
:
"angularjs-slider"
,
"version"
:
"2.7.
0
"
,
"version"
:
"2.7.
1
"
,
"homepage"
:
"https://github.com/angular-slider/angularjs-slider"
,
"homepage"
:
"https://github.com/angular-slider/angularjs-slider"
,
"authors"
:
[
"authors"
:
[
"Rafal Zajac <rzajac@gmail.com>"
,
"Rafal Zajac <rzajac@gmail.com>"
,
...
...
demo/demo.js
View file @
c6984774
...
@@ -135,6 +135,26 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) {
...
@@ -135,6 +135,26 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) {
}
}
};
};
//Slider config with custom display function using html formatting
$scope
.
slider_translate_html
=
{
minValue
:
100
,
maxValue
:
400
,
options
:
{
floor
:
0
,
ceil
:
500
,
translate
:
function
(
value
,
sliderId
,
label
)
{
switch
(
label
)
{
case
'model'
:
return
'<b>Min price:</b> $'
+
value
;
case
'high'
:
return
'<b>Max price:</b> $'
+
value
;
default
:
return
'$'
+
value
}
}
}
};
//Slider config with steps array of letters
//Slider config with steps array of letters
$scope
.
slider_alphabet
=
{
$scope
.
slider_alphabet
=
{
value
:
0
,
value
:
0
,
...
...
demo/index.html
View file @
c6984774
...
@@ -115,6 +115,15 @@
...
@@ -115,6 +115,15 @@
></rzslider>
></rzslider>
</article>
</article>
<article>
<h2>
Slider with custom display function using html formatting
</h2>
<rzslider
rz-slider-model=
"slider_translate_html.minValue"
rz-slider-high=
"slider_translate_html.maxValue"
rz-slider-options=
"slider_translate_html.options"
></rzslider>
</article>
<article>
<article>
<h2>
Slider with Alphabet
</h2>
<h2>
Slider with Alphabet
</h2>
<rzslider
<rzslider
...
...
dist/rzslider.css
View file @
c6984774
/*! angularjs-slider - v2.7.
0
-
/*! angularjs-slider - v2.7.
1
-
(c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> -
(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/angular-slider/angularjs-slider -
https://github.com/angular-slider/angularjs-slider -
2016-02-06 */
2016-02-06 */
...
...
dist/rzslider.js
View file @
c6984774
/*! angularjs-slider - v2.7.
0
-
/*! angularjs-slider - v2.7.
1
-
(c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> -
(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/angular-slider/angularjs-slider -
https://github.com/angular-slider/angularjs-slider -
2016-02-06 */
2016-02-06 */
...
@@ -885,7 +885,7 @@
...
@@ -885,7 +885,7 @@
newOffset
-
this
.
minLab
.
rzsd
/
2
+
this
.
handleHalfDim
,
newOffset
-
this
.
minLab
.
rzsd
/
2
+
this
.
handleHalfDim
,
0
0
),
),
this
.
barDimension
-
this
.
ceil
Lab
.
rzsd
this
.
barDimension
-
this
.
min
Lab
.
rzsd
);
);
this
.
setPosition
(
this
.
minLab
,
pos
);
this
.
setPosition
(
this
.
minLab
,
pos
);
...
@@ -901,7 +901,7 @@
...
@@ -901,7 +901,7 @@
updateHighHandle
:
function
(
newOffset
)
{
updateHighHandle
:
function
(
newOffset
)
{
this
.
setPosition
(
this
.
maxH
,
newOffset
);
this
.
setPosition
(
this
.
maxH
,
newOffset
);
this
.
translateFn
(
this
.
scope
.
rzSliderHigh
,
this
.
maxLab
,
'high'
);
this
.
translateFn
(
this
.
scope
.
rzSliderHigh
,
this
.
maxLab
,
'high'
);
var
pos
=
Math
.
min
(
newOffset
-
this
.
maxLab
.
rzsd
/
2
+
this
.
handleHalfDim
,
this
.
barDimension
-
this
.
ceil
Lab
.
rzsd
);
var
pos
=
Math
.
min
(
newOffset
-
this
.
maxLab
.
rzsd
/
2
+
this
.
handleHalfDim
,
this
.
barDimension
-
this
.
max
Lab
.
rzsd
);
this
.
setPosition
(
this
.
maxLab
,
pos
);
this
.
setPosition
(
this
.
maxLab
,
pos
);
this
.
shFloorCeil
();
this
.
shFloorCeil
();
...
...
dist/rzslider.min.css
View file @
c6984774
/*! angularjs-slider - v2.7.
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/angular-slider/angularjs-slider - 2016-02-06 */
/*! angularjs-slider - v2.7.
1
- (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/angular-slider/angularjs-slider - 2016-02-06 */
rzslider
{
position
:
relative
;
display
:
inline-block
;
width
:
100%
;
height
:
4px
;
margin
:
35px
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
]
.rz-pointer
{
cursor
:
not-allowed
;
background-color
:
#d8e0f3
}
rzslider
span
{
position
:
absolute
;
display
:
inline-block
;
white-space
:
nowrap
}
rzslider
.rz-base
{
width
:
100%
;
height
:
100%
;
padding
:
0
}
rzslider
.rz-bar-wrapper
{
left
:
0
;
z-index
:
1
;
width
:
100%
;
height
:
32px
;
padding-top
:
16px
;
margin-top
:
-16px
;
box-sizing
:
border-box
}
rzslider
.rz-bar-wrapper.rz-draggable
{
cursor
:
move
}
rzslider
.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
.rz-bar.rz-selection
{
z-index
:
2
;
background
:
#0db9f0
;
-webkit-border-radius
:
2px
;
-moz-border-radius
:
2px
;
border-radius
:
2px
}
rzslider
.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
.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
.rz-pointer
:hover:after
{
background-color
:
#fff
}
rzslider
.rz-pointer.rz-active
{
z-index
:
4
}
rzslider
.rz-pointer.rz-active
:after
{
background-color
:
#451aff
}
rzslider
.rz-bubble
{
bottom
:
16px
;
padding
:
1px
3px
;
color
:
#55637d
;
cursor
:
default
}
rzslider
.rz-bubble.rz-selection
{
top
:
16px
}
rzslider
.rz-bubble.rz-limit
{
color
:
#55637d
}
rzslider
.rz-ticks
{
position
:
absolute
;
top
:
-3px
;
left
:
0
;
z-index
:
1
;
display
:
-webkit-flex
;
display
:
-ms-flexbox
;
display
:
flex
;
width
:
100%
;
height
:
0
;
padding
:
0
11px
;
margin
:
0
;
list-style
:
none
;
box-sizing
:
border-box
;
-webkit-justify-content
:
space-between
;
-ms-flex-pack
:
justify
;
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
)}
rzslider
.vertical
{
position
:
relative
;
width
:
4px
;
height
:
100%
;
padding
:
0
;
margin
:
0
20px
;
vertical-align
:
baseline
}
rzslider
.vertical
.rz-base
{
width
:
100%
;
height
:
100%
;
padding
:
0
}
rzslider
.vertical
.rz-bar-wrapper
{
top
:
auto
;
left
:
0
;
width
:
32px
;
height
:
100%
;
padding
:
0
0
0
16px
;
margin
:
0
0
0
-16px
}
rzslider
.vertical
.rz-bar
{
bottom
:
0
;
left
:
auto
;
width
:
4px
;
height
:
100%
}
rzslider
.vertical
.rz-pointer
{
top
:
auto
;
bottom
:
0
;
left
:
-14px
!important
}
rzslider
.vertical
.rz-bubble
{
bottom
:
0
;
left
:
16px
!important
;
margin-left
:
3px
}
rzslider
.vertical
.rz-bubble.rz-selection
{
top
:
auto
;
left
:
16px
!important
}
rzslider
.vertical
.rz-ticks
{
top
:
0
;
left
:
-3px
;
z-index
:
1
;
width
:
0
;
height
:
100%
;
padding
:
11px
0
;
-webkit-flex-direction
:
column-reverse
;
-ms-flex-direction
:
column-reverse
;
flex-direction
:
column-reverse
}
rzslider
.vertical
.rz-ticks
.tick
{
vertical-align
:
middle
}
rzslider
.vertical
.rz-ticks
.tick
.tick-value
{
top
:
auto
;
right
:
-30px
;
transform
:
translate
(
0
,
-28%
)}
rzslider
{
position
:
relative
;
display
:
inline-block
;
width
:
100%
;
height
:
4px
;
margin
:
35px
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
]
.rz-pointer
{
cursor
:
not-allowed
;
background-color
:
#d8e0f3
}
rzslider
span
{
position
:
absolute
;
display
:
inline-block
;
white-space
:
nowrap
}
rzslider
.rz-base
{
width
:
100%
;
height
:
100%
;
padding
:
0
}
rzslider
.rz-bar-wrapper
{
left
:
0
;
z-index
:
1
;
width
:
100%
;
height
:
32px
;
padding-top
:
16px
;
margin-top
:
-16px
;
box-sizing
:
border-box
}
rzslider
.rz-bar-wrapper.rz-draggable
{
cursor
:
move
}
rzslider
.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
.rz-bar.rz-selection
{
z-index
:
2
;
background
:
#0db9f0
;
-webkit-border-radius
:
2px
;
-moz-border-radius
:
2px
;
border-radius
:
2px
}
rzslider
.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
.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
.rz-pointer
:hover:after
{
background-color
:
#fff
}
rzslider
.rz-pointer.rz-active
{
z-index
:
4
}
rzslider
.rz-pointer.rz-active
:after
{
background-color
:
#451aff
}
rzslider
.rz-bubble
{
bottom
:
16px
;
padding
:
1px
3px
;
color
:
#55637d
;
cursor
:
default
}
rzslider
.rz-bubble.rz-selection
{
top
:
16px
}
rzslider
.rz-bubble.rz-limit
{
color
:
#55637d
}
rzslider
.rz-ticks
{
position
:
absolute
;
top
:
-3px
;
left
:
0
;
z-index
:
1
;
display
:
-webkit-flex
;
display
:
-ms-flexbox
;
display
:
flex
;
width
:
100%
;
height
:
0
;
padding
:
0
11px
;
margin
:
0
;
list-style
:
none
;
box-sizing
:
border-box
;
-webkit-justify-content
:
space-between
;
-ms-flex-pack
:
justify
;
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
)}
rzslider
.vertical
{
position
:
relative
;
width
:
4px
;
height
:
100%
;
padding
:
0
;
margin
:
0
20px
;
vertical-align
:
baseline
}
rzslider
.vertical
.rz-base
{
width
:
100%
;
height
:
100%
;
padding
:
0
}
rzslider
.vertical
.rz-bar-wrapper
{
top
:
auto
;
left
:
0
;
width
:
32px
;
height
:
100%
;
padding
:
0
0
0
16px
;
margin
:
0
0
0
-16px
}
rzslider
.vertical
.rz-bar
{
bottom
:
0
;
left
:
auto
;
width
:
4px
;
height
:
100%
}
rzslider
.vertical
.rz-pointer
{
top
:
auto
;
bottom
:
0
;
left
:
-14px
!important
}
rzslider
.vertical
.rz-bubble
{
bottom
:
0
;
left
:
16px
!important
;
margin-left
:
3px
}
rzslider
.vertical
.rz-bubble.rz-selection
{
top
:
auto
;
left
:
16px
!important
}
rzslider
.vertical
.rz-ticks
{
top
:
0
;
left
:
-3px
;
z-index
:
1
;
width
:
0
;
height
:
100%
;
padding
:
11px
0
;
-webkit-flex-direction
:
column-reverse
;
-ms-flex-direction
:
column-reverse
;
flex-direction
:
column-reverse
}
rzslider
.vertical
.rz-ticks
.tick
{
vertical-align
:
middle
}
rzslider
.vertical
.rz-ticks
.tick
.tick-value
{
top
:
auto
;
right
:
-30px
;
transform
:
translate
(
0
,
-28%
)}
\ No newline at end of file
dist/rzslider.min.js
View file @
c6984774
This diff is collapsed.
Click to expand it.
package.json
View file @
c6984774
{
{
"name"
:
"angularjs-slider"
,
"name"
:
"angularjs-slider"
,
"version"
:
"2.7.
0
"
,
"version"
:
"2.7.
1
"
,
"description"
:
"AngularJS slider directive with no external dependencies. Mobile friendly!."
,
"description"
:
"AngularJS slider directive with no external dependencies. Mobile friendly!."
,
"main"
:
"dist/rzslider.js"
,
"main"
:
"dist/rzslider.js"
,
"repository"
:
{
"repository"
:
{
...
...
src/rzslider.js
View file @
c6984774
...
@@ -889,7 +889,7 @@
...
@@ -889,7 +889,7 @@
newOffset
-
this
.
minLab
.
rzsd
/
2
+
this
.
handleHalfDim
,
newOffset
-
this
.
minLab
.
rzsd
/
2
+
this
.
handleHalfDim
,
0
0
),
),
this
.
barDimension
-
this
.
ceil
Lab
.
rzsd
this
.
barDimension
-
this
.
min
Lab
.
rzsd
);
);
this
.
setPosition
(
this
.
minLab
,
pos
);
this
.
setPosition
(
this
.
minLab
,
pos
);
...
@@ -905,7 +905,7 @@
...
@@ -905,7 +905,7 @@
updateHighHandle
:
function
(
newOffset
)
{
updateHighHandle
:
function
(
newOffset
)
{
this
.
setPosition
(
this
.
maxH
,
newOffset
);
this
.
setPosition
(
this
.
maxH
,
newOffset
);
this
.
translateFn
(
this
.
scope
.
rzSliderHigh
,
this
.
maxLab
,
'high'
);
this
.
translateFn
(
this
.
scope
.
rzSliderHigh
,
this
.
maxLab
,
'high'
);
var
pos
=
Math
.
min
(
newOffset
-
this
.
maxLab
.
rzsd
/
2
+
this
.
handleHalfDim
,
this
.
barDimension
-
this
.
ceil
Lab
.
rzsd
);
var
pos
=
Math
.
min
(
newOffset
-
this
.
maxLab
.
rzsd
/
2
+
this
.
handleHalfDim
,
this
.
barDimension
-
this
.
max
Lab
.
rzsd
);
this
.
setPosition
(
this
.
maxLab
,
pos
);
this
.
setPosition
(
this
.
maxLab
,
pos
);
this
.
shFloorCeil
();
this
.
shFloorCeil
();
...
...
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