width.value = screen.width * dppx;
height.value = screen.height * dppx;
The point is - dppx value do not changes when MacOS scaling changes. But screen.width is changing.
Default scaling in macOS macbook pro 13:
screen.width = 1440
dppx = 2
Larger scaling in macOS macbook pro 13:
screen.width = 1280
dppx = 2
The point is -
dppxvalue do not changes when MacOS scaling changes. Butscreen.widthis changing.Default scaling in macOS macbook pro 13:
Larger scaling in macOS macbook pro 13: