9/4/2023 0 Comments Javascript resize event![]() If we have map on multiple screens and navigating between them then initialisation of new screen (and map) is run before previous "destroy". ![]() ![]() Window.addEventListener("resize", $parameters.ObjResize) Window.removeEventListener("resize", $parameters.ObjResize) Īlso if we remove event listener before adding new one it also fixes the issue. There is removeEventListener in OnDestroy of Map block. If AutoFitOnWindowResize is False the event listener EventListener("resize", $parameters.ObjResize) won't be set and no error will be logged in console. The window resize event occurs whenever the size of the browser window gets changed. The resize event is sent to the window element when the size of the browser window. Consider removing this call by using the 'On Destroy' event of the screen/block or moving your logic to a global client action Description: Bind an event handler to the resize JavaScript event. This is likely due to a platform's client action being used as an event handler or in a setTimeout function. Invalid call of the 'Map_OnResize' client action of the '***' since the latter is not currently active. A JavaScript Runtime A resize event handler We need to set any methods as JavaScript invokable JSInvokable that we want to be called from our JavaScript code. Paul Irish explains: If you’ve ever attached an event handler to the window’s resize event, you have probably noticed that while Firefox fires the event slow and sensibly, IE and Webkit go totally spastic. If we set AutoFitOnWindowResize input of Map block as True and navigate between screens and try to rotate the device (or change screen size in simulator) we have this error: JavaScript events like scroll and resize can cause huge performance issues on certain browsers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |