You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cvat/cvat-ui/src/utils/is-able-to-change-frame.ts

17 lines
485 B
TypeScript

// Copyright (C) 2021-2022 Intel Corporation
//
// SPDX-License-Identifier: MIT
import { getCVATStore } from 'cvat-store';
import { CombinedState } from 'reducers/interfaces';
export default function isAbleToChangeFrame(): boolean {
const store = getCVATStore();
const state: CombinedState = store.getState();
const { instance } = state.annotation.canvas;
return !!instance && instance.isAbleToChangeFrame() &&
!state.annotation.player.navigationBlocked;
}