Slider component

Hello,

Do you think it’s possible to create a slider component with goJS ? Do you have a sample ?

Thanks!

Franck

Yes, it’s quite possible. No, I don’t have a sample. Sorry. I’ve been wanting to create one for years, but now I have additional incentive to do so. But I can’t make any promises.

I suppose we must create a new tool like SliderReshapingTool ? Do you think it’s possible to add a snap property ?

Just another question do you have a demo to animate a shape (like sliding a shape from the left to right of a container panel) ?

I’m not sure such a tool is necessary – I need to spend some time designing it first.

By the way, I think it would make sense for the appearance to start with a Graduated Panel: GoJS Graduated Panels -- Northwoods Software. For example: Thermometer

I’ll see what I can come up with tomorrow if I have time.

I don’t know if we have any examples just like what you’re asking for, but here’s one that revolves a node around another node forever: Eternal Revolution

I am also interested!

Here’s the first step in creating a “Slider” component:

There’s still a way to go, but maybe this can get you started well enough for now. Be sure to read GoJS Graduated Panels -- Northwoods Software and related samples and documentation.

Amazing! Why you change randomly the value with a timeout ?

Just to demonstrate that the value can be changed without the user dragging the indicator. And for amusement. Don’t call loop() if you don’t want to.

There is one clear bug there that I haven’t figured out yet. If you haven’t seen it, never mind. Just be warned that this code isn’t good enough yet to warrant being its own sample.