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
831212b2
Commit
831212b2
authored
Nov 01, 2015
by
Valentin Hervieu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an id option that is passed to the translate function as second arg
As discussed in #161
parent
1843254e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
rzslider.js
dist/rzslider.js
+4
-3
rzslider.min.js
dist/rzslider.min.js
+1
-1
rzslider.js
src/rzslider.js
+4
-3
No files found.
dist/rzslider.js
View file @
831212b2
...
...
@@ -37,6 +37,7 @@
ceil
:
null
,
//defaults to rz-slider-model
step
:
1
,
precision
:
0
,
id
:
null
,
translate
:
null
,
stepsArray
:
null
,
draggableRange
:
false
,
...
...
@@ -553,7 +554,7 @@
translateFn
:
function
(
value
,
label
,
useCustomTr
)
{
useCustomTr
=
useCustomTr
===
undefined
?
true
:
useCustomTr
;
var
valStr
=
String
((
useCustomTr
?
this
.
customTrFn
(
value
)
:
value
)),
var
valStr
=
String
((
useCustomTr
?
this
.
customTrFn
(
value
,
this
.
options
.
id
)
:
value
)),
getWidth
=
false
;
if
(
label
.
rzsv
===
undefined
||
label
.
rzsv
.
length
!==
valStr
.
length
||
(
label
.
rzsv
.
length
>
0
&&
label
.
rzsw
===
0
))
{
...
...
@@ -872,7 +873,7 @@
* @returns {*}
*/
getDisplayValue
:
function
(
value
)
{
return
this
.
customTrFn
(
value
);
return
this
.
customTrFn
(
value
,
this
.
options
.
id
);
},
/**
...
...
dist/rzslider.min.js
View file @
831212b2
This diff is collapsed.
Click to expand it.
src/rzslider.js
View file @
831212b2
...
...
@@ -37,6 +37,7 @@
ceil
:
null
,
//defaults to rz-slider-model
step
:
1
,
precision
:
0
,
id
:
null
,
translate
:
null
,
stepsArray
:
null
,
draggableRange
:
false
,
...
...
@@ -553,7 +554,7 @@
translateFn
:
function
(
value
,
label
,
useCustomTr
)
{
useCustomTr
=
useCustomTr
===
undefined
?
true
:
useCustomTr
;
var
valStr
=
String
((
useCustomTr
?
this
.
customTrFn
(
value
)
:
value
)),
var
valStr
=
String
((
useCustomTr
?
this
.
customTrFn
(
value
,
this
.
options
.
id
)
:
value
)),
getWidth
=
false
;
if
(
label
.
rzsv
===
undefined
||
label
.
rzsv
.
length
!==
valStr
.
length
||
(
label
.
rzsv
.
length
>
0
&&
label
.
rzsw
===
0
))
{
...
...
@@ -872,7 +873,7 @@
* @returns {*}
*/
getDisplayValue
:
function
(
value
)
{
return
this
.
customTrFn
(
value
);
return
this
.
customTrFn
(
value
,
this
.
options
.
id
);
},
/**
...
...
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