Closed RoxDevvv closed 3 years ago
If you are talking about dragging a pane, it is out of the scope of the library. Related: #88
Why is it out of the scope of the library? what can be done to enable this
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.
Makes sense. Thank you for the explanation!
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.
it will be nice if you add dragging support !!