mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Full Screen mode (#1212)
This commit is contained in:
parent
81b38d8808
commit
2de4fe29ad
8 changed files with 42 additions and 7 deletions
|
@ -144,6 +144,14 @@ export function resetCursor() {
|
|||
document.documentElement.style.cursor = "";
|
||||
}
|
||||
|
||||
export const isFullScreen = () =>
|
||||
document.fullscreenElement?.nodeName === "HTML";
|
||||
|
||||
export const allowFullScreen = () =>
|
||||
document.documentElement.requestFullscreen();
|
||||
|
||||
export const exitFullScreen = () => document.exitFullscreen();
|
||||
|
||||
export const getShortcutKey = (shortcut: string, prefix = " — "): string => {
|
||||
const isMac = /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
|
||||
if (isMac) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue