Does devicePixelRatio change when dragging browser window between monitors?

With Macbook Pro Retina, you can connect an external monitor and drag the browser window between the retina screen and another normal DPI display.

Is this causing a dynamic change window.devicePixelRatio

? And if so, is there any event that I can control when this happens?

I don't have one in front of me to check. I need to know because I might need to re-paint the canvas if it changes.

+3


source to share


1 answer


Yes devicePixelRatio changes and you can detect it using matchMedia

.

I think you should take a look at this thread to give a more detailed answer for change detection:



fooobar.com/questions/983440 / ...

+2


source







All Articles