[IPOL discuss] slider inputs for IPOL demos
Nicolas Limare
nicolas.limare at cmla.ens-cachan.fr
Tue Feb 8 13:09:37 CET 2011
> For some IPOL demos, it would be convenient to use slider inputs for
> real-valued parameters.
> [...]
>
> Although this should be simple, most implementations on the web are
> pretty complicated. [...] Some sliders are implemented as one part
> of a larger UI framework (mountains of code).
This is the reason why I haven't been working on JavaScript features
for IPOL yet. I don't know if it is better to write our own minimal
code and maintain it, or use a large library widely tested and written
and maintained by pros. I don't know much about the vast choice of JS
libraries, and didn't reserve enough time to investigate this
question.
Do you think a JS library is too much for our needs? What about the
slider in jQueryUI, a major player in this field?
-> http://docs.jquery.com/UI/Slider
-> http://jqueryui.com/demos/slider/
> I have developed a 200-line implementation that, to the best of my
> abilities, satisfies these goals:
>
> http://www.math.ucla.edu/~getreuer/slider.html
Very nice, compact and elegant! A few remarks:
* You could use the "label" element, I think it's more semantic:
<label for="value1">Value 1</label>
<input type="text" style="font-family:monospace;"
size="7" id="value1" value="-2" >
* Why did you choose to use a <div>, not a simple <img> for the thumb?
(just curiosity)
* I tried to modify it a little, and put the "sliderline" and
"sliderthumb" elements into a common "slider" div element in order
to freely position the slider and get rid of the table because I'm
not a big fan of tables used for the page layout. But I couldn't
reach a working solution, so if anyone has more CSS know-how...
* I also tried to have the min and max values appear on both ends of
the slider, here again without success.
> I am aware that IPOL generally avoids JavaScript,
IPOL avoids useless or unmaintained JavaScript. Any well written and
tested JavaScript bringing usability improvements without good
fallback behaviour is welcome.
> What are your thoughts about using this slider in IPOL demos?
I like it. Once we are sure we want to follow this path (and not use a
JS library), it can be included and available for all the demos.
Soufiane, I think you have some experience with JavaScript in the
PLATO project. What is your opinion?
--
Nicolas LIMARE
http://nicolas.limare.net/ pgp:0xFA423F4F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://tools.ipol.im/mailman/archive/discuss/attachments/20110208/8fa39c07/attachment-0001.pgp>
More information about the discuss
mailing list