mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-10 17:33:24 +01:00
Fix readonly setting typo
This commit is contained in:
parent
6742950ab4
commit
87115cda37
@ -1,10 +1,17 @@
|
||||
/* eslint-disable import/no-unresolved */
|
||||
/* eslint-disable no-undef */
|
||||
/* eslint-disable vars-on-top */
|
||||
import { $notify } from '@wisemapping/core-js';
|
||||
import jquery from 'jquery';
|
||||
import { $notify } from './components/widget/ToolbarNotifier';
|
||||
import { buildDesigner, buildOptions } from './components/DesignerBuilder';
|
||||
import RESTPersistenceManager from './components/RestPersistenceManager';
|
||||
import PersistenceManager from './components/PersistenceManager';
|
||||
import LocalStorageManager from './components/LocalStorageManager';
|
||||
|
||||
// This hack is required to initialize Bootstrap. In future, this should be removed.
|
||||
global.jQuery = jquery;
|
||||
require('@libraries/bootstrap/js/bootstrap');
|
||||
|
||||
// Configure designer options ...
|
||||
let persistence;
|
||||
if (!global.memoryPersistence && !global.readOnlyMode) {
|
||||
@ -25,7 +32,7 @@ if (!global.memoryPersistence && !global.readOnlyMode) {
|
||||
|
||||
const options = buildOptions({
|
||||
persistenceManager: persistence,
|
||||
isReadOnly: global.readOnlyMode || false,
|
||||
readOnly: global.readOnly || false,
|
||||
mapId: global.mapId,
|
||||
zoom: global.userOptions.zoom,
|
||||
});
|
||||
|
@ -3,9 +3,12 @@ import { buildDesigner, buildOptions } from '../../../../src/components/Designer
|
||||
import { PersistenceManager, LocalStorageManager } from '../../../../src';
|
||||
|
||||
const p = new LocalStorageManager('samples/{id}.xml');
|
||||
const options = buildOptions({ persistenceManager: p, readOnly: false });
|
||||
const options = buildOptions({ persistenceManager: p, readOnly: true, saveOnLoad: false });
|
||||
|
||||
// Obtain map id from query param
|
||||
const params = new URLSearchParams(window.location.search.substring(1));
|
||||
const mapId = params.get('id') || 'welcome';
|
||||
|
||||
const mapId = 'welcome';
|
||||
const designer = buildDesigner(options);
|
||||
designer.addEvent('loadSuccess', () => {
|
||||
document.getElementById('mindplot').classList.add('ready');
|
||||
|
Loading…
Reference in New Issue
Block a user