[IPOL discuss] A comment on sliders on demos

Miguel Colom colom at cmla.ens-cachan.fr
Sat Mar 29 11:45:55 CET 2014


Hi Rafa,

Quoting rafael grompone von gioi <grompone at gmail.com>:
> Hi everyone,
>
> I have a minor comment about the use of sliders on demos.
> I made some experiments of Gaussian filtering with the
> demo of following article:
>
> "A Survey of Gaussian Convolution Algorithms"
> Pascal Getreuer
> http://www.ipol.im/pub/art/2013/87/
>

> I finally downloaded the code and
> compiled and made the experiments. But I spent
> more time than necessarily. In the same way I can
> set a value on the text box like 0.56789 that cannot be
> set with the slider (I could set 0.5 or 0.6), it would be
> nice to be able also to set 20, even if it out the slider
> range.

Well, we can change the step of the slider to any step we need.
In this case, it's configured to 0.1, but it could be 0.01, 0.001, or  
whatever we need.

I think we should not change the default behaviour of the sliders to  
allow values over its maximum, for several reasons:
- It's a restriction that is chosen by the author of the demo, and  
thus it's supposed to produce results that make sense.
- It's the behaviour that users expect for these kind of controls.  
Changing the maximum of the slider depending on the value of the  
textbox would be really confusing for the users, that are used to the  
way such controls respond. It'd be counterintuitive.

> Of course, this is probably not a problem of this
> particular demo but of the way these sliders and
> their text boxes are set. Is there any simple solution?

For the step of the slider, yes: we just need to change it.
To change the behaviour of the control and reconfigure  
programmatically its maximum: it's possible to do it with some  
javascript lines, but I don't think it's a good idea at all.

Best,
Miguel




More information about the discuss mailing list