mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
update threshold for detecting zoom
This commit is contained in:
parent
c1f972179a
commit
b07bdaa46a
1 changed files with 1 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue