Is there a fix for the crash issue when zooming while a script is set on the position changed event?
Is there a fix for the crash issue when zooming while a script is set on the position changed event? A way to disable the script while zooming would work fine for me. Would actually be better if I could just attach a script to the desktop and set the events in the code so I could have more control over the events and have global variables to reduce api calls. I’d assume that would be possible?
]]>
« Using LL now with Android 5.1 on my Note 3. (Previous Post)
< ![CDATA[
As I understood the issue appears because the script triggers a position change event inside the position change event itself, hence generating and endless loop (stack overflow).
Try to break the loop this way:
setTimeout(function() {
your stuff here
}, 0);
It will be executed without delay, but in another cycle of the message loop, hence not recursively.
]]>
< ![CDATA[
Pierre Hébert Weird. Why does it trigger the event? I’m guessing that’s why it makes the scrolling really weird and accelerated. Well at least it doesn’t crash anymore.
]]>
< ![CDATA[
This is a sum of side effects… The z-index change has for side effect to re-compute some data related to the bounds and current transformation (translate and scale, aka pan and zoom). It then has the effect to trigger a position changed event which was incorrectly filtered. Fixing that is not easy.
]]>