cocopon / tweakpane

:control_knobs: Compact GUI for fine-tuning parameters and monitoring value changes
https://tweakpane.github.io/docs/
MIT License
3.52k stars 87 forks source link

dragging support #301

Closed RoxDevvv closed 3 years ago

RoxDevvv commented 3 years ago

it will be nice if you add dragging support !!

cocopon commented 3 years ago

If you are talking about dragging a pane, it is out of the scope of the library. Related: #88

2arch commented 1 year ago

Why is it out of the scope of the library? what can be done to enable this

cocopon commented 1 year ago

Why is it out of the scope of the library?

Please refer the related comment:

Tweakpane has an option container to specify its parent element and users can locate the pane to anywhere with that option. So I think a position of the pane is out of scope of the library. https://github.com/cocopon/tweakpane/issues/88#issuecomment-692647065

The scope of Tweakpane is as far as specifying a container element. The position and the size of the pane should be handled by CSS since it's a matter of appearance. If you want to implement a draggable pane, you should make a container element draggable.

2arch commented 1 year ago

Makes sense. Thank you for the explanation!

kitschpatrol commented 8 months ago

If case anyone else finds this issue and is interested in a draggable Tweakpane, I have an implementation in my Tweakpane x Svelte wrapper, svelte-tweakpane-ui.

Of course it's pretty Svelte-heavy, but the code still might be helpful if you're in a different framework.

It also handles z-ordering of multiple panes, scaling, some accommodations for reliable touch input, position persistence across page reloads, and pane width resizability.