diff --git a/package-lock.json b/package-lock.json index 6d15f19e..554039ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,6 @@ "moment": "^2.29.4", "prop-types": "^15.8.1", "react-draggable": "^4.4.6", - "react-full-screen": "^1.1.1", "react-hotkeys": "^2.0.0", "react-i18next": "^14.0.5", "react-remove-scroll": "^2.5.7", @@ -3561,11 +3560,6 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "node_modules/fscreen": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fscreen/-/fscreen-1.2.0.tgz", - "integrity": "sha512-hlq4+BU0hlPmwsFjwGGzZ+OZ9N/wq9Ljg/sq3pX+2CD7hrJsX9tJgWWK/wiNTFM212CLHWhicOoqwXyZGGetJg==" - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -9260,20 +9254,6 @@ "node": ">=6" } }, - "node_modules/react-full-screen": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/react-full-screen/-/react-full-screen-1.1.1.tgz", - "integrity": "sha512-xoEgkoTiN0dw9cjYYGViiMCBYbkS97BYb4bHPhQVWXj1UnOs8PZ1rPzpX+2HMhuvQV1jA5AF9GaRbO3fA5aZtg==", - "dependencies": { - "fscreen": "^1.0.2" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "react": ">= 16.8.0" - } - }, "node_modules/react-github-btn": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/react-github-btn/-/react-github-btn-1.4.0.tgz", diff --git a/package.json b/package.json index 9ccc9a4a..1163e37a 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "moment": "^2.29.4", "prop-types": "^15.8.1", "react-draggable": "^4.4.6", - "react-full-screen": "^1.1.1", "react-hotkeys": "^2.0.0", "react-i18next": "^14.0.5", "react-remove-scroll": "^2.5.7", diff --git a/src/Annotator/index.jsx b/src/Annotator/index.jsx index 4f208e5a..a18bb566 100644 --- a/src/Annotator/index.jsx +++ b/src/Annotator/index.jsx @@ -47,7 +47,6 @@ export const Annotator = ({ hidePrev, hideClone, hideSettings, - hideFullScreen, hideSave, enabledRegionProps = ["class", "name"], userReducer @@ -149,7 +148,6 @@ export const Annotator = ({ hidePrev={hidePrev} hideClone={hideClone} hideSettings={hideSettings} - hideFullScreen={hideFullScreen} hideSave={hideSave} enabledRegionProps={enabledRegionProps} /> @@ -193,7 +191,6 @@ Annotator.propTypes = { hidePrev: PropTypes.bool, hideClone: PropTypes.bool, hideSettings: PropTypes.bool, - hideFullScreen: PropTypes.bool, hideSave: PropTypes.bool, enabledRegionProps: PropTypes.arrayOf(PropTypes.string), userReducer: PropTypes.func diff --git a/src/Annotator/reducers/general-reducer.js b/src/Annotator/reducers/general-reducer.js index f9be9bb5..34cce09e 100644 --- a/src/Annotator/reducers/general-reducer.js +++ b/src/Annotator/reducers/general-reducer.js @@ -840,13 +840,6 @@ export default (state, action) => { case "help": { return state } - case "fullscreen": { - return setIn(state, ["fullScreen"], true) - } - case "exit fullscreen": - case "window": { - return setIn(state, ["fullScreen"], false) - } case "hotkeys": { return state } diff --git a/src/MainLayout/icon-dictionary.jsx b/src/MainLayout/icon-dictionary.jsx index 1db9ef04..32a90b5e 100644 --- a/src/MainLayout/icon-dictionary.jsx +++ b/src/MainLayout/icon-dictionary.jsx @@ -15,7 +15,6 @@ import { faTag, faVectorSquare } from "@fortawesome/free-solid-svg-icons" -import FullscreenIcon from "@mui/icons-material/Fullscreen" import AccessibilityNewIcon from "@mui/icons-material/AccessibilityNew" const faStyle = { marginTop: 4, width: 16, height: 16, marginBottom: 4 } @@ -69,8 +68,7 @@ export const iconDictionary = { "modify-allowed-area": () => ( ), - "create-keypoints": AccessibilityNewIcon, - window: FullscreenIcon, + "create-keypoints": AccessibilityNewIcon } export default iconDictionary diff --git a/src/MainLayout/index.jsx b/src/MainLayout/index.jsx index f7d0db36..23c2e477 100644 --- a/src/MainLayout/index.jsx +++ b/src/MainLayout/index.jsx @@ -1,6 +1,5 @@ // @flow -import {FullScreen, useFullScreenHandle} from "react-full-screen" import React, {useCallback, useRef} from "react" import {createTheme, styled, ThemeProvider} from "@mui/material/styles" @@ -24,7 +23,6 @@ import {useSettings} from "../SettingsProvider" import {withHotKeys} from "react-hotkeys" import {Save} from "@mui/icons-material" -// import Fullscreen from "../Fullscreen" const emptyArr = [] const theme = createTheme() @@ -35,15 +33,6 @@ const HotkeyDiv = withHotKeys(({hotKeys, children, divRef, ...props}) => ( )) -const FullScreenContainer = styled("div")(({theme}) => ({ - width: "100%", - height: "100%", - "& .fullscreen": { - width: "100%", - height: "100%", - }, -})) - export const MainLayout = ({ state, dispatch, @@ -55,12 +44,10 @@ export const MainLayout = ({ hidePrev = false, hideClone = false, hideSettings = false, - hideFullScreen = false, hideSave = false, enabledRegionProps, }) => { const settings = useSettings() - const fullScreenHandle = useFullScreenHandle() const memoizedActionFns = useRef({}) const action = (type, ...params) => { @@ -179,32 +166,15 @@ export const MainLayout = ({ enabledRegionProps={enabledRegionProps} /> ) - const onClickHeaderItem = useEventCallback((item) => { - if (item.name === "Fullscreen") { - fullScreenHandle.enter() - } else if (item.name === "Window") { - fullScreenHandle.exit() - } dispatch({type: "HEADER_BUTTON_CLICKED", buttonName: item.name}) }) - const debugModeOn = Boolean(window.localStorage.$ANNOTATE_DEBUG_MODE && state) const nextImageHasRegions = !nextImage || (nextImage.regions && nextImage.regions.length > 0) return ( - - { - if (!open) { - fullScreenHandle.exit() - action("HEADER_BUTTON_CLICKED", "buttonName")("Window") - } - }} - > }, ].filter(Boolean)} onClickHeaderItem={onClickHeaderItem} @@ -310,8 +274,6 @@ export const MainLayout = ({ {canvas} - - ) } diff --git a/src/MainLayout/styles.js b/src/MainLayout/styles.js index a1c6906e..9e58acc6 100644 --- a/src/MainLayout/styles.js +++ b/src/MainLayout/styles.js @@ -9,14 +9,6 @@ export default { maxHeight: "100vh", backgroundColor: "#fff", overflow: "hidden", - "&.fullscreen": { - position: "absolute", - zIndex: 99999, - left: 0, - right: 0, - top: 0, - bottom: 0, - }, }, headerTitle: { fontWeight: "bold", diff --git a/src/workspace/icon-mapping.js b/src/workspace/icon-mapping.js index d0ae2c1e..186aee9d 100644 --- a/src/workspace/icon-mapping.js +++ b/src/workspace/icon-mapping.js @@ -4,7 +4,6 @@ import PlayIcon from "@mui/icons-material/PlayArrow" import PauseIcon from "@mui/icons-material/Pause" import SettingsIcon from "@mui/icons-material/Settings" import HelpIcon from "@mui/icons-material/Help" -import FullscreenIcon from "@mui/icons-material/Fullscreen" import ExitIcon from "@mui/icons-material/ExitToApp" import QueuePlayNextIcon from "@mui/icons-material/QueuePlayNext" import HotkeysIcon from "@mui/icons-material/Keyboard" @@ -20,7 +19,6 @@ export const iconMapping = { settings: SettingsIcon, options: SettingsIcon, help: HelpIcon, - fullscreen: FullscreenIcon, exit: ExitIcon, quit: ExitIcon, save: ExitIcon,