moving panel with event.drag has a "dead zone"
I have an issue when dragging a panel with event.drag (not allowDragging property)
The panel is moving as I want, but you always need to "unstick" it from its position before it moves.
There is a "dead zone" of 5px that you need to pass when dragging, otherwise, the panel sticks to its position.
it is the same when coming back to the starting point, like if the panel is hitting something 5px ahead, both in X & Y...
What is even more strange is that it doesn't do that with the allowDragging property...
can I do something so I can have precise movement?
Here's a quick snippet
No idea of what I can do? It is very annoying as I need precise settings…
Or, another way would be using the allowDragging property, but I can't find a way to disable the property on the fly. It doesn't work with a JSON property change inside an event in a mouse callback, and I don't think it is the good way to proceed anyway…
dustbro last edited by
yeah... there's something a little sticky in the top left corner. Doesn't happen on the Canvas, but exists on the Interface preview
Yes in fact this zone moves wherever the new panel position is, so you can never replace the panel at its origin
event.drag doesn't trigger before reaching a displacement of 5px
simply attaching a variable to event.drag shows it goes from 0 to 5 with no transition
and 5 to -5 in the other direction which makes a 10x10 dead square
Christoph Hart last edited by
There‘s a threshhold to distinguish mouse clicks from drags, so most probably you‘re hitting this. Has this a real world implication?
Yes I am using the movement of a panel for controlling parameters, like frequency, gain, and Q (for the latter, the panel stops via event.ctrlDown) so the "dead zone" is critical, and moreover, you can't go back at the starting point, so it makes any setting quite difficult.
I just tried by the mean of the allowDragging property, and it is the same...
I mean, the panel moves smoothly from the first pixel, but the movement detection still has a 5px threshold due to the event.drag in the mouse callback
orange last edited by
That's right it would be very cool
I am thinking to another use of moving the panels, so it would be cool to have the option to remove this threshold