diff --git a/client/src/Annotation/index.jsx b/client/src/Annotation/index.jsx index 4e84785..66feba5 100644 --- a/client/src/Annotation/index.jsx +++ b/client/src/Annotation/index.jsx @@ -178,17 +178,8 @@ export default () => { onSelectJump={onSelectJumpHandle} showTags={true} selectedTool= {getToolSelectionType(settings.configuration.regions)} - onNextImage={() => { - const updatedIndex = (selectedImageIndex + 1) % imageNames.length - changeSelectedImageIndex(isNaN(updatedIndex ) ? 0 : updatedIndex) - }} - onPrevImage={() => { - const updatedIndex = (selectedImageIndex - 1 + imageNames.length) % imageNames.length - changeSelectedImageIndex(isNaN(updatedIndex ) ? 0 : updatedIndex) - }} openDocs={() => window.open(config.DOCS_URL, '_blank')} hideSettings={true} - disabledNextAndPrev={settings.images.length <= 1} selectedImageIndex={selectedImageIndex} />)} diff --git a/client/src/Annotator/index.jsx b/client/src/Annotator/index.jsx index 86aec45..d2dadfc 100644 --- a/client/src/Annotator/index.jsx +++ b/client/src/Annotator/index.jsx @@ -14,7 +14,6 @@ import videoReducer from "./reducers/video-reducer.js" import PropTypes from "prop-types" import noopReducer from "./reducers/noop-reducer.js" import {useTranslation} from "react-i18next" -import getActiveImage from "./reducers/get-active-image.js" import { saveActiveImage, saveData, splitRegionData, getImageData} from "../utils/send-data-to-server" import { useSnackbar} from "../SnackbarContext/index.jsx" export const Annotator = ({ @@ -46,18 +45,13 @@ export const Annotator = ({ videoTime = 0, videoName, onExit, - onNextImage, showMask, settings, - onPrevImage, keypointDefinitions, onSelectJump, openDocs, hideHeader, hideHeaderText, - hideNext, - hidePrev, - disabledNextAndPrev, hideClone, hideSettings, hideSave, @@ -164,10 +158,6 @@ export const Annotator = ({ } else { return onExit(without(state, "history")); } - } else if (action.buttonName === "Next" && onNextImage) { - return onNextImage(without(state, "history")); - } else if (action.buttonName === "Prev" && onPrevImage) { - return onPrevImage(without(state, "history")); } else if (action.buttonName === "Docs" ) { return openDocs(); } @@ -198,16 +188,11 @@ export const Annotator = ({ return ( { case "HEADER_BUTTON_CLICKED": { const buttonName = action.buttonName.toLowerCase() switch (buttonName) { - case "prev": { - if (currentImageIndex === null) return state - if (currentImageIndex === 0) return state - return setNewImage( - state.images[currentImageIndex - 1], - currentImageIndex - 1 - ) - } - case "next": { - if (currentImageIndex === null) return state - if (currentImageIndex === state.images.length - 1) return state - return setNewImage( - state.images[currentImageIndex + 1], - currentImageIndex + 1 - ) - } case "clone": { if (currentImageIndex === null) return state if (currentImageIndex === state.images.length - 1) return state diff --git a/client/src/MainLayout/index.jsx b/client/src/MainLayout/index.jsx index 048eee1..92801e9 100644 --- a/client/src/MainLayout/index.jsx +++ b/client/src/MainLayout/index.jsx @@ -44,14 +44,9 @@ export const MainLayout = ({ onRegionClassAdded, hideHeader, hideHeaderText, - hideNext = false, - hidePrev = false, - disabledNextAndPrev, - hideClone = false, + hideClone = true, hideSettings = false, - downloadImage = false, hideSave = false, - allImages = [], onSelectJump, saveActiveImage, enabledRegionProps, @@ -240,8 +235,6 @@ export const MainLayout = ({ ].filter(Boolean)} headerItems={[ { name: "Download", label:t("btn.download"), disabled: !state.enabledDownload, hasInnerMenu: true}, - !hidePrev && {name: "Prev", label: t("btn.previous"), disabled: disabledNextAndPrev}, - !hideNext && {name: "Next", label: t("btn.next"), disabled: disabledNextAndPrev}, state.annotationType !== "video" ? null : !state.videoPlaying diff --git a/client/src/ShortcutsManager/index.jsx b/client/src/ShortcutsManager/index.jsx index 2a62bf6..5247dd6 100644 --- a/client/src/ShortcutsManager/index.jsx +++ b/client/src/ShortcutsManager/index.jsx @@ -112,18 +112,6 @@ export const useDispatchHotkeyHandlers = ({ dispatch }) => { selectedTool: "create-pixel", }) }, - save_and_previous_sample: () => { - dispatch({ - type: "HEADER_BUTTON_CLICKED", - buttonName: "Prev", - }) - }, - save_and_next_sample: () => { - dispatch({ - type: "HEADER_BUTTON_CLICKED", - buttonName: "Next", - }) - }, save_and_exit_sample: () => { dispatch({ type: "HEADER_BUTTON_CLICKED", diff --git a/sample_images/configuration.png b/sample_images/configuration.png index 7b9aa8f..4f62738 100644 Binary files a/sample_images/configuration.png and b/sample_images/configuration.png differ diff --git a/sample_images/example.png b/sample_images/example.png index 99bec79..b6ef877 100644 Binary files a/sample_images/example.png and b/sample_images/example.png differ