mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
Fix compilation
This commit is contained in:
parent
ce284a1202
commit
034d514cb5
@ -2,7 +2,7 @@ import { EditorOptions } from '@wisemapping/editor';
|
|||||||
import { EditorRenderMode } from '@wisemapping/mindplot';
|
import { EditorRenderMode } from '@wisemapping/mindplot';
|
||||||
import AppConfig from '../../classes/app-config';
|
import AppConfig from '../../classes/app-config';
|
||||||
|
|
||||||
export default class EditorOptionsBuilder {
|
class EditorOptionsBuilder {
|
||||||
static build(locale: string, mode: EditorRenderMode, hotkeys: boolean): EditorOptions {
|
static build(locale: string, mode: EditorRenderMode, hotkeys: boolean): EditorOptions {
|
||||||
|
|
||||||
let options: EditorOptions = {
|
let options: EditorOptions = {
|
||||||
@ -38,3 +38,4 @@ export default class EditorOptionsBuilder {
|
|||||||
return !AppConfig.isDevelopEnv() ? global.mapId : 11;
|
return !AppConfig.isDevelopEnv() ? global.mapId : 11;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export default EditorOptionsBuilder;
|
||||||
|
@ -10,8 +10,7 @@ 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, fetchAccount, fetchMapById } from '../../redux/clientSlice';
|
import { activeInstance, fetchAccount, fetchMapById } from '../../redux/clientSlice';
|
||||||
import EditorOptionsBulder from './EditorOptionsBuider';
|
import EditorOptionsBuilder from './EditorOptionsBuilder';
|
||||||
|
|
||||||
|
|
||||||
export type EditorPropsType = {
|
export type EditorPropsType = {
|
||||||
isTryMode: boolean;
|
isTryMode: boolean;
|
||||||
@ -46,7 +45,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// What is the role ?
|
// What is the role ?
|
||||||
const mapId = EditorOptionsBulder.loadMapId();
|
const mapId = EditorOptionsBuilder.loadMapId();
|
||||||
const mode = findEditorMode(isTryMode, mapId);
|
const mode = findEditorMode(isTryMode, mapId);
|
||||||
|
|
||||||
// Account settings can be null and editor cannot be initilized multiple times. This creates problems
|
// Account settings can be null and editor cannot be initilized multiple times. This creates problems
|
||||||
@ -56,7 +55,7 @@ const EditorPage = ({ isTryMode }: EditorPropsType): React.ReactElement => {
|
|||||||
|
|
||||||
let options, persistence: PersistenceManager;
|
let options, persistence: PersistenceManager;
|
||||||
if (loadCompleted) {
|
if (loadCompleted) {
|
||||||
options = EditorOptionsBulder.build(userLocale.code, mode, hotkey);
|
options = EditorOptionsBuilder.build(userLocale.code, mode, hotkey);
|
||||||
persistence = client.buildPersistenceManager(mode);
|
persistence = client.buildPersistenceManager(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user