Skip to content

Commit cc0e9c7

Browse files
committed
Work for https://surveyjs.answerdesk.io/ticket/details/T1000 - nouislider modify pips mode or values
1 parent bcfc946 commit cc0e9c7

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/nouislider.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ function init(Survey) {
2626
{
2727
name: "rangeMax:number",
2828
default: 100
29+
},
30+
{
31+
name: "pipsMode",
32+
default: "positions"
33+
},
34+
{
35+
name: "pipsValues:itemvalues",
36+
default: [0, 25, 50, 75, 100]
37+
},
38+
{
39+
name: "pipsDensity:number",
40+
default: 5
2941
}
3042
]);
3143
},
@@ -41,9 +53,9 @@ function init(Survey) {
4153
step: question.step,
4254
tooltips: true,
4355
pips: {
44-
mode: "positions",
45-
values: [0, 25, 50, 75, 100],
46-
density: 5
56+
mode: question.pipsMode || "positions",
57+
values: question.pipsValues || [0, 25, 50, 75, 100],
58+
density: question.pipsDensity || 5
4759
},
4860
range: {
4961
min: question.rangeMin,

0 commit comments

Comments
 (0)