File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -359,6 +359,9 @@ export const DEFAULT_UI_OPTIONS: AppProps["UIOptions"] = {
359
359
// mobile: up to 699px
360
360
export const MQ_MAX_MOBILE = 800 ;
361
361
362
+ export const MQ_MAX_WIDTH_LANDSCAPE = 1000 ;
363
+ export const MQ_MAX_HEIGHT_LANDSCAPE = 500 ;
364
+
362
365
// tablets
363
366
export const MQ_MIN_TABLET = MQ_MAX_MOBILE + 1 ; // lower bound (excludes phones)
364
367
export const MQ_MAX_TABLET = 1400 ; // upper bound (excludes laptops/desktops)
Original file line number Diff line number Diff line change @@ -104,6 +104,8 @@ import {
104
104
MQ_MIN_TABLET ,
105
105
MQ_MAX_TABLET ,
106
106
isProdEnv ,
107
+ MQ_MAX_HEIGHT_LANDSCAPE ,
108
+ MQ_MAX_WIDTH_LANDSCAPE ,
107
109
} from "@excalidraw/common" ;
108
110
109
111
import {
@@ -2446,8 +2448,10 @@ class App extends React.Component<AppProps, AppState> {
2446
2448
} ;
2447
2449
2448
2450
private isMobileBreakpoint = ( width : number , height : number ) => {
2449
- const minSide = Math . min ( width , height ) ;
2450
- return minSide <= MQ_MAX_MOBILE ;
2451
+ return (
2452
+ width <= MQ_MAX_MOBILE ||
2453
+ ( height < MQ_MAX_HEIGHT_LANDSCAPE && width < MQ_MAX_WIDTH_LANDSCAPE )
2454
+ ) ;
2451
2455
} ;
2452
2456
2453
2457
private isTabletBreakpoint = ( editorWidth : number , editorHeight : number ) => {
You can’t perform that action at this time.
0 commit comments