From cc0e9c7c508eb22f59fddb7bcdd4b15f7c16085c Mon Sep 17 00:00:00 2001 From: tsv2013 Date: Thu, 30 Aug 2018 11:04:48 +0300 Subject: [PATCH] Work for https://surveyjs.answerdesk.io/ticket/details/T1000 - nouislider modify pips mode or values --- src/nouislider.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/nouislider.js b/src/nouislider.js index 643d728f..818568df 100644 --- a/src/nouislider.js +++ b/src/nouislider.js @@ -26,6 +26,18 @@ function init(Survey) { { name: "rangeMax:number", default: 100 + }, + { + name: "pipsMode", + default: "positions" + }, + { + name: "pipsValues:itemvalues", + default: [0, 25, 50, 75, 100] + }, + { + name: "pipsDensity:number", + default: 5 } ]); }, @@ -41,9 +53,9 @@ function init(Survey) { step: question.step, tooltips: true, pips: { - mode: "positions", - values: [0, 25, 50, 75, 100], - density: 5 + mode: question.pipsMode || "positions", + values: question.pipsValues || [0, 25, 50, 75, 100], + density: question.pipsDensity || 5 }, range: { min: question.rangeMin,