Skip to content

Commit 191d9a8

Browse files
author
anchouls
committed
Add ticks and labels to slider scale
1 parent af0be64 commit 191d9a8

File tree

1 file changed

+11
-0
lines changed
  • ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/config/survey

1 file changed

+11
-0
lines changed

ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/config/survey/HtmlQuestion.kt

+11
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,17 @@ data class SliderHtmlQuestion(
199199
append("min=\"$min\" max=\"$max\" step=\"$step\" ${isRequiredString()} ")
200200
append(" style=\"width: 100%; display: block;\">")
201201

202+
append("<div style=\"display: flex; justify-content: space-between; color: white;\">")
203+
(min..max step step).forEachIndexed { index, value ->
204+
append("<div style=\"text-align: center; flex: 1; position: relative;\">")
205+
append("<div style=\"width: 2px; height: 10px; background: white; margin: auto;\"></div>")
206+
if (index % 5 == 0) {
207+
append("<span style=\"display: block; margin-top: 2px;\">$value</span>")
208+
}
209+
append("</div>")
210+
}
211+
append("</div>")
212+
202213
append("<div style=\"display: flex; justify-content: space-between; color: white;\">")
203214
append("<span>${labels.min}</span>")
204215
append("<span>${labels.max}</span>")

0 commit comments

Comments
 (0)