You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.
I haven't delved into this too deeply beyond observing the effect, but the timeout strategy behind the event callback is dropping events (maybe 1 out of 10 times or so). Given the nature of the issue it is relatively hard to reproduce, but try to observe "start" events (e.g. "drag start") across a series of drags and every once in a while it won't appear when you start dragging.
My guess is that events are stacking up and clearing previous events' timeouts (e.g. an "apply" coming on the back of a "drag start" will clear the "drag start" timeout so that it never calls the callback).
The text was updated successfully, but these errors were encountered:
Your guess is correct, and I had to fight over a similar issue before.
The current code for FreeTransform will call your callback event and send status of any recent events that occurred. But if two events occur close to one another, the second event will cancel out the call of the first event before it has had a chance to be fired. The reason is because each event triggers a call to your callback function through a setTimeout method, but each event will first clear any existing timeouts triggered from before. As browsers and CPUs get faster and support more multi-threading, it is possible to have two events triggered within 1ms of each other which makes the current code fail on tracking all events in order.
The solution I used, which works for handling all events as they are called, in order, is to replace the function asyncCallback with the one below:
I haven't delved into this too deeply beyond observing the effect, but the timeout strategy behind the event callback is dropping events (maybe 1 out of 10 times or so). Given the nature of the issue it is relatively hard to reproduce, but try to observe "start" events (e.g. "drag start") across a series of drags and every once in a while it won't appear when you start dragging.
My guess is that events are stacking up and clearing previous events' timeouts (e.g. an "apply" coming on the back of a "drag start" will clear the "drag start" timeout so that it never calls the callback).
The text was updated successfully, but these errors were encountered: