Application.init({resizeTo: window})
broke when upgrading v8-alpha.1 to v8-alpha.2
#9604
joergplewe
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear admired developers!
I try to keep track with v8 development and noticed the following detail when upgrading alpha.1 to alpha.2:
Application.init({resizeTo: window})
still does a nice job, but it sizes the<canvas>
too big whenwindow.devicePixelRatio === 2
.Meaning
canvas.width === canvas.getBoundingClientRect().width
.With alpha.1 it was
canvas.width === canvas.getBoundingClientRect().width * settings.RESOLUTION
. Or vice versa.This can be attacked by limiting the canvas' layout size by CSS, but I wonder whether this is the developers idea.
Additionally, I found that the initial
settings
object hassettings.RESOLUTION === 2
, even ifwindow.devicePixelRatio === 1
.Is this intentional? In my code, I use to override
settings.RESOLUTION = window.devicePixelRatio;
In case there is a better place to put my observations, please give me a hint.
Beta Was this translation helpful? Give feedback.
All reactions