mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-08-06 05:46:26 +00:00
update threshold for detecting zoom
This commit is contained in:
@@ -922,9 +922,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||
const scrollBarWidth = 10;
|
||||
const widthRatio =
|
||||
(window.outerWidth - scrollBarWidth) / window.innerWidth;
|
||||
const isBrowserZoomed =
|
||||
// Device pixel ratio is 2 when zoom is 100%
|
||||
window.devicePixelRatio !== 2 || widthRatio < 0.9 || widthRatio > 1;
|
||||
const isBrowserZoomed = widthRatio < 0.75 || widthRatio > 1.1;
|
||||
if (isBrowserZoomed) {
|
||||
this.setToastMessage(t("alerts.browserZoom"));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user