(gd, sliderGroup, sliderOpts)
| 245 | } |
| 246 | |
| 247 | function drawSlider(gd, sliderGroup, sliderOpts) { |
| 248 | // This is related to the other long notes in this file regarding what happens |
| 249 | // when slider steps disappear. This particular fix handles what happens when |
| 250 | // the *current* slider step is removed. The drawing functions will error out |
| 251 | // when they fail to find it, so the fix for now is that it will just draw the |
| 252 | // slider in the first position but will not execute the command. |
| 253 | if(!((sliderOpts.steps[sliderOpts.active] || {}).visible)) { |
| 254 | sliderOpts.active = sliderOpts._visibleSteps[0]._index; |
| 255 | } |
| 256 | |
| 257 | // These are carefully ordered for proper z-ordering: |
| 258 | sliderGroup |
| 259 | .call(drawCurrentValue, sliderOpts) |
| 260 | .call(drawRail, sliderOpts) |
| 261 | .call(drawLabelGroup, sliderOpts) |
| 262 | .call(drawTicks, sliderOpts) |
| 263 | .call(drawTouchRect, gd, sliderOpts) |
| 264 | .call(drawGrip, gd, sliderOpts); |
| 265 | |
| 266 | var dims = sliderOpts._dims; |
| 267 | |
| 268 | // Position the rectangle: |
| 269 | Drawing.setTranslate(sliderGroup, dims.lx + sliderOpts.pad.l, dims.ly + sliderOpts.pad.t); |
| 270 | |
| 271 | sliderGroup.call(setGripPosition, sliderOpts, false); |
| 272 | sliderGroup.call(drawCurrentValue, sliderOpts); |
| 273 | } |
| 274 | |
| 275 | function drawCurrentValue(sliderGroup, sliderOpts, valueOverride) { |
| 276 | if(!sliderOpts.currentvalue.visible) return; |
no outgoing calls
no test coverage detected
searching dependent graphs…