mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-13 02:37:57 +01:00
Revert variable name
This commit is contained in:
parent
eb4e6e3e71
commit
5b4134f18c
@ -96,7 +96,6 @@ const Editor = ({
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (options.enableKeyboardEvents) {
|
if (options.enableKeyboardEvents) {
|
||||||
console.log("options.enableKeyboardEvents"+options.enableKeyboardEvents)
|
|
||||||
DesignerKeyboard.resume();
|
DesignerKeyboard.resume();
|
||||||
} else {
|
} else {
|
||||||
DesignerKeyboard.pause();
|
DesignerKeyboard.pause();
|
||||||
|
@ -4,7 +4,7 @@ import { ActionType } from '../maps-page/action-chooser';
|
|||||||
import Editor from '@wisemapping/editor';
|
import Editor from '@wisemapping/editor';
|
||||||
import AppI18n from '../../classes/app-i18n';
|
import AppI18n from '../../classes/app-i18n';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { hotkeys } from '../../redux/editorSlice';
|
import { hotkeysEnabled } from '../../redux/editorSlice';
|
||||||
import ReactGA from 'react-ga';
|
import ReactGA from 'react-ga';
|
||||||
import Client from '../../classes/client';
|
import Client from '../../classes/client';
|
||||||
import { activeInstance } from '../../redux/clientSlice';
|
import { activeInstance } from '../../redux/clientSlice';
|
||||||
@ -17,7 +17,7 @@ export type EditorPropsType = {
|
|||||||
|
|
||||||
const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
|
const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
|
||||||
const [activeDialog, setActiveDialog] = React.useState<ActionType | null>(null);
|
const [activeDialog, setActiveDialog] = React.useState<ActionType | null>(null);
|
||||||
const hotkeysEnabled = useSelector(hotkeys);
|
const hotkey = useSelector(hotkeysEnabled);
|
||||||
const userLocale = AppI18n.getUserLocale();
|
const userLocale = AppI18n.getUserLocale();
|
||||||
const client: Client = useSelector(activeInstance);
|
const client: Client = useSelector(activeInstance);
|
||||||
const [persistenceManager, setPersistenceManager] = React.useState<PersistenceManager>();
|
const [persistenceManager, setPersistenceManager] = React.useState<PersistenceManager>();
|
||||||
@ -30,7 +30,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// As temporal hack, editor properties are propagated from global variables...
|
// As temporal hack, editor properties are propagated from global variables...
|
||||||
const { mapId, options } = EditorOptionsBulder.build(userLocale.code, hotkeysEnabled, isTryMode);
|
const { mapId, options } = EditorOptionsBulder.build(userLocale.code, hotkey, isTryMode);
|
||||||
return persistenceManager ? (
|
return persistenceManager ? (
|
||||||
<>
|
<>
|
||||||
<Editor onAction={setActiveDialog}
|
<Editor onAction={setActiveDialog}
|
||||||
|
@ -22,7 +22,7 @@ export const editorSlice = createSlice({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const hotkeys = (state: RootState): boolean => {
|
export const hotkeysEnabled = (state: RootState): boolean => {
|
||||||
return state.editor.hotkeysEnabled;
|
return state.editor.hotkeysEnabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user