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
947ebd14
Commit
947ebd14
authored
Dec 16, 2013
by
Rafal Zajac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes
parent
6a95f30f
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
11 deletions
+31
-11
bower.json
bower.json
+1
-1
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
rzslider.js
+26
-6
No files found.
bower.json
View file @
947ebd14
{
{
"name"
:
"angularjs-slider"
,
"name"
:
"angularjs-slider"
,
"version"
:
"0.1.
1
"
,
"version"
:
"0.1.
2
"
,
"homepage"
:
"https://github.com/rzajac/angularjs-slider"
,
"homepage"
:
"https://github.com/rzajac/angularjs-slider"
,
"authors"
:
[
"authors"
:
[
"Rafal Zajac <rzajac@gmail.com>"
"Rafal Zajac <rzajac@gmail.com>"
...
...
dist/rzslider.min.css
View file @
947ebd14
/*! angularjs-slider - v0.1.
1
- (c) Rafal Zajac <rzajac@gmail.com>, https://github.com/rzajac/angularjs-slider.git - 2013-12-16 */
/*! angularjs-slider - v0.1.
2
- (c) Rafal Zajac <rzajac@gmail.com>, https://github.com/rzajac/angularjs-slider.git - 2013-12-16 */
rzslider
{
position
:
relative
;
display
:
inline-block
;
width
:
100%
;
height
:
2px
;
margin
:
30px
0
15px
0
;
vertical-align
:
middle
}
rzslider
span
{
position
:
absolute
;
display
:
inline-block
;
white-space
:
nowrap
}
rzslider
span
.base
{
width
:
100%
;
height
:
100%
;
padding
:
0
}
rzslider
span
.bar
{
z-index
:
0
;
width
:
100%
;
height
:
100%
;
background
:
#fff
}
rzslider
span
.bar.selection
{
z-index
:
1
;
width
:
0
;
background
:
#67b700
}
rzslider
span
.pointer
{
top
:
-15px
;
z-index
:
2
;
width
:
32px
;
height
:
32px
;
cursor
:
pointer
;
background-color
:
#fff
;
-webkit-border-radius
:
16px
;
-moz-border-radius
:
16px
;
border-radius
:
16px
}
rzslider
span
.pointer
:after
{
position
:
absolute
;
top
:
12px
;
left
:
12px
;
width
:
8px
;
height
:
8px
;
background
:
#71818e
;
-webkit-border-radius
:
4px
;
-moz-border-radius
:
4px
;
border-radius
:
4px
;
content
:
''
}
rzslider
span
.pointer
:hover:after
{
background-color
:
#67b700
}
rzslider
span
.pointer.active
:after
{
background-color
:
#67b700
}
rzslider
span
.bubble
{
top
:
-32px
;
padding
:
1px
3px
1px
3px
;
color
:
#67b700
;
cursor
:
default
}
rzslider
span
.bubble.selection
{
top
:
15px
}
rzslider
span
.bubble.limit
{
color
:
#67b700
}
rzslider
{
position
:
relative
;
display
:
inline-block
;
width
:
100%
;
height
:
2px
;
margin
:
30px
0
15px
0
;
vertical-align
:
middle
}
rzslider
span
{
position
:
absolute
;
display
:
inline-block
;
white-space
:
nowrap
}
rzslider
span
.base
{
width
:
100%
;
height
:
100%
;
padding
:
0
}
rzslider
span
.bar
{
z-index
:
0
;
width
:
100%
;
height
:
100%
;
background
:
#fff
}
rzslider
span
.bar.selection
{
z-index
:
1
;
width
:
0
;
background
:
#67b700
}
rzslider
span
.pointer
{
top
:
-15px
;
z-index
:
2
;
width
:
32px
;
height
:
32px
;
cursor
:
pointer
;
background-color
:
#fff
;
-webkit-border-radius
:
16px
;
-moz-border-radius
:
16px
;
border-radius
:
16px
}
rzslider
span
.pointer
:after
{
position
:
absolute
;
top
:
12px
;
left
:
12px
;
width
:
8px
;
height
:
8px
;
background
:
#71818e
;
-webkit-border-radius
:
4px
;
-moz-border-radius
:
4px
;
border-radius
:
4px
;
content
:
''
}
rzslider
span
.pointer
:hover:after
{
background-color
:
#67b700
}
rzslider
span
.pointer.active
:after
{
background-color
:
#67b700
}
rzslider
span
.bubble
{
top
:
-32px
;
padding
:
1px
3px
1px
3px
;
color
:
#67b700
;
cursor
:
default
}
rzslider
span
.bubble.selection
{
top
:
15px
}
rzslider
span
.bubble.limit
{
color
:
#67b700
}
\ No newline at end of file
dist/rzslider.min.js
View file @
947ebd14
This diff is collapsed.
Click to expand it.
package.json
View file @
947ebd14
{
{
"name"
:
"angularjs-slider"
,
"name"
:
"angularjs-slider"
,
"version"
:
"0.1.
1
"
,
"version"
:
"0.1.
2
"
,
"description"
:
"AngularJS slider directive with no external dependencies. Mobile friendly!."
,
"description"
:
"AngularJS slider directive with no external dependencies. Mobile friendly!."
,
"main"
:
"rzslider.js"
,
"main"
:
"rzslider.js"
,
"repository"
:
{
"repository"
:
{
...
...
rzslider.js
View file @
947ebd14
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* (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.
1
* Version: v0.1.
2
*
*
* Licensed under the MIT license
* Licensed under the MIT license
*/
*/
...
@@ -203,7 +203,6 @@ function throttle(func, wait, options) {
...
@@ -203,7 +203,6 @@ function throttle(func, wait, options) {
this
.
calcViewDimensions
();
this
.
calcViewDimensions
();
this
.
setMinAndMax
();
this
.
setMinAndMax
();
this
.
valueRange
=
this
.
maxValue
-
this
.
minValue
;
this
.
precision
=
this
.
scope
.
rzSliderPrecision
===
undefined
?
0
:
+
this
.
scope
.
rzSliderPrecision
;
this
.
precision
=
this
.
scope
.
rzSliderPrecision
===
undefined
?
0
:
+
this
.
scope
.
rzSliderPrecision
;
this
.
step
=
this
.
scope
.
rzSliderStep
===
undefined
?
1
:
+
this
.
scope
.
rzSliderStep
;
this
.
step
=
this
.
scope
.
rzSliderStep
===
undefined
?
1
:
+
this
.
scope
.
rzSliderStep
;
...
@@ -278,11 +277,14 @@ function throttle(func, wait, options) {
...
@@ -278,11 +277,14 @@ function throttle(func, wait, options) {
*
*
* @param {number|string} value
* @param {number|string} value
* @param {jqLite} label
* @param {jqLite} label
* @param {bool} useCustomTr
* @returns {undefined}
* @returns {undefined}
*/
*/
translateFn
:
function
(
value
,
label
)
translateFn
:
function
(
value
,
label
,
useCustomTr
)
{
{
var
valStr
=
this
.
customTrFn
?
''
+
this
.
customTrFn
(
value
)
:
''
+
value
,
useCustomTr
=
useCustomTr
===
undefined
?
true
:
useCustomTr
;
var
valStr
=
this
.
customTrFn
&&
useCustomTr
?
''
+
this
.
customTrFn
(
value
)
:
''
+
value
,
getWidth
=
false
;
getWidth
=
false
;
if
(
label
.
rzsv
===
undefined
||
label
.
rzsv
.
length
!=
valStr
.
length
)
if
(
label
.
rzsv
===
undefined
||
label
.
rzsv
.
length
!=
valStr
.
length
)
...
@@ -321,6 +323,8 @@ function throttle(func, wait, options) {
...
@@ -321,6 +323,8 @@ function throttle(func, wait, options) {
{
{
this
.
scope
.
rzSliderCeil
=
this
.
maxValue
=
this
.
range
?
this
.
scope
.
rzSliderHigh
:
this
.
scope
.
rzSliderModel
;
this
.
scope
.
rzSliderCeil
=
this
.
maxValue
=
this
.
range
?
this
.
scope
.
rzSliderHigh
:
this
.
scope
.
rzSliderModel
;
}
}
this
.
valueRange
=
this
.
maxValue
-
this
.
minValue
;
},
},
/**
/**
...
@@ -560,9 +564,22 @@ function throttle(func, wait, options) {
...
@@ -560,9 +564,22 @@ function throttle(func, wait, options) {
*/
*/
updateCmbLabel
:
function
()
updateCmbLabel
:
function
()
{
{
var
lowTr
,
highTr
;
if
(
this
.
minLab
.
rzsl
+
this
.
minLab
.
rzsw
+
10
>=
this
.
maxLab
.
rzsl
)
if
(
this
.
minLab
.
rzsl
+
this
.
minLab
.
rzsw
+
10
>=
this
.
maxLab
.
rzsl
)
{
{
this
.
translateFn
(
this
.
scope
.
rzSliderModel
+
' - '
+
this
.
scope
.
rzSliderHigh
,
this
.
cmbLab
);
if
(
this
.
customTrFn
)
{
lowTr
=
this
.
customTrFn
(
this
.
scope
.
rzSliderModel
);
highTr
=
this
.
customTrFn
(
this
.
scope
.
rzSliderHigh
);
}
else
{
lowTr
=
this
.
scope
.
rzSliderModel
;
highTr
=
this
.
scope
.
rzSliderHigh
;
}
this
.
translateFn
(
lowTr
+
' - '
+
highTr
,
this
.
cmbLab
,
false
);
this
.
setLeft
(
this
.
cmbLab
,
this
.
selBar
.
rzsl
+
this
.
selBar
.
rzsw
/
2
-
this
.
cmbLab
.
rzsw
/
2
);
this
.
setLeft
(
this
.
cmbLab
,
this
.
selBar
.
rzsl
+
this
.
selBar
.
rzsw
/
2
-
this
.
cmbLab
.
rzsw
/
2
);
this
.
hideEl
(
this
.
minLab
);
this
.
hideEl
(
this
.
minLab
);
this
.
hideEl
(
this
.
maxLab
);
this
.
hideEl
(
this
.
maxLab
);
...
@@ -707,6 +724,9 @@ function throttle(func, wait, options) {
...
@@ -707,6 +724,9 @@ function throttle(func, wait, options) {
if
(
this
.
tracking
!==
''
)
{
return
}
if
(
this
.
tracking
!==
''
)
{
return
}
// We have to do this in case the HTML where the sliders are on
// have been animated into view.
this
.
calcViewDimensions
();
this
.
tracking
=
ref
;
this
.
tracking
=
ref
;
pointer
.
addClass
(
'active'
);
pointer
.
addClass
(
'active'
);
...
...
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