I’ve just moved from Open FL 3.1 to 3.4 , and appear to have lost control of a number of crucial events when targetting this platform.
my stage rezise listener no longer fires when targetting html (but does on other targets i.e. flash, neko, windows )
Lib.current.stage.addEventListener(Event.RESIZE, resize);
my injected js visibilitychange listener also no longer fires when the “visibilitychange” event occurs.
untyped __js__ ("document.addEventListener(\"visibilitychange\", $bind(this,this.handleVisibilityChange));");
Looking at the generated .js there appears to be a HandleWindowEvent for “resize” , which in turn calls this.parent.windows[0].backend.handleResize(); which appears to scale and offset the canvas <div>
to resize it.
I’d like to a) reenable my own handling of the resize event, (as i used to in 3.1.0, and still have to on my other targets) , and b) I’d also like to be able to make my canvas use the full viewable browser window when a size event occurs, rather than it being shrunk to a rectangle in the centre of the window. So is there an easy way to override the <div>
based scaleing and offsetting that’s been introduced since 3.1 ?