mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Fix compilation
This commit is contained in:
parent
0dec2cc4cb
commit
7bae385924
@ -8,6 +8,9 @@
|
||||
"airbnb-base",
|
||||
"plugin:cypress/recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 11
|
||||
},
|
||||
"globals": {
|
||||
// designer is a global currently used as a hack. Remove this when fixing the hack.
|
||||
"designer": true
|
||||
|
@ -56,7 +56,7 @@ export function buildDesigner(options) {
|
||||
|
||||
// Configure default persistence manager ...
|
||||
const persistence = options.persistenceManager;
|
||||
$assert(persistence, "persistence must be defined");
|
||||
$assert(persistence, 'persistence must be defined');
|
||||
PersistenceManager.init(persistence);
|
||||
|
||||
// Register toolbar event ...
|
||||
@ -73,7 +73,7 @@ export function buildDesigner(options) {
|
||||
}
|
||||
|
||||
export function buildDefaultOptions(persistence, readOnly = false) {
|
||||
$assert(persistence, "persistence must be defined");
|
||||
$assert(persistence, 'persistence must be defined');
|
||||
// Set workspace screen size as default. In this way, resize issues are solved.
|
||||
const containerSize = {
|
||||
height: Number.parseInt(window.screen.height, 10),
|
||||
@ -85,7 +85,7 @@ export function buildDefaultOptions(persistence, readOnly = false) {
|
||||
width: Number.parseInt(window.innerWidth, 10),
|
||||
};
|
||||
return {
|
||||
readOnly: readOnly,
|
||||
readOnly,
|
||||
zoom: 0.85,
|
||||
saveOnLoad: true,
|
||||
size: containerSize,
|
||||
@ -109,7 +109,7 @@ export async function loadOptions(jsonConf, persistence, readOnly = false) {
|
||||
|
||||
export function loadExample(exampleFn) {
|
||||
$(() => {
|
||||
// Hack: load bootstrap first
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import('@libraries/bootstrap').then(exampleFn);
|
||||
});
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { $notify } from '@wisemapping/core-js';
|
||||
import { buildDesigner, loadDesignerOptions } from './components/DesignerBuilder';
|
||||
import { buildDesigner, buildDefaultOptions } from './components/DesignerBuilder';
|
||||
import RESTPersistenceManager from './components/RestPersistenceManager';
|
||||
import PersistenceManager from './components/PersistenceManager';
|
||||
|
||||
@ -13,7 +13,7 @@ global.lockSession = 111111;
|
||||
global.lockTimestamp = 11111;
|
||||
|
||||
// Configure designer options ...
|
||||
const options = loadDesignerOptions();
|
||||
const options = buildDefaultOptions();
|
||||
|
||||
if (!global.memoryPersistence && !global.readOnlyMode) {
|
||||
options.persistenceManager = new RESTPersistenceManager(
|
||||
|
Loading…
Reference in New Issue
Block a user