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
Is there something like a window.onresize = function(){} available on the global object?
When looking at the bindings, I found something like sizeChanged(width, height) that seems to be called, but I couldn't find it somewhere else.
Other ways of resizing the window (setting innerWidth, innerHeight or calling setSize()) seem to fire no event or callback.
My questions are now as follows:
Is there a way to get the viewport size (like 1920x1080 when my window is smaller)?
If not, is there a way to get resize events of the window when the user maximizes it?
Fullscreen mode could be optional, if not wanted - but if so, dependencies would be the previous two points to implement it manually.
Use case could be as follows:
window.addEventListener('resize',function(width,height){console.log('window was resized by user, need to resize my canvas nao');});letmybutton=newDummyFullscreenButton();mybutton.bind('touch',function(){if(window.viewportWidth<window.innerWidth||window.viewportHeight<window.innerHeight){window.setSize(window.viewportWidth,window.viewportHeight);}});
The text was updated successfully, but these errors were encountered:
Is there something like a
window.onresize = function(){}
available on theglobal
object?When looking at the bindings, I found something like sizeChanged(width, height) that seems to be called, but I couldn't find it somewhere else.
Other ways of resizing the window (setting innerWidth, innerHeight or calling setSize()) seem to fire no event or callback.
My questions are now as follows:
Use case could be as follows:
The text was updated successfully, but these errors were encountered: