mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 22:57:57 +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 */
|
/* 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 { buildDesigner, buildOptions } from './components/DesignerBuilder';
|
||||||
import RESTPersistenceManager from './components/RestPersistenceManager';
|
import RESTPersistenceManager from './components/RestPersistenceManager';
|
||||||
import PersistenceManager from './components/PersistenceManager';
|
import PersistenceManager from './components/PersistenceManager';
|
||||||
import LocalStorageManager from './components/LocalStorageManager';
|
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 ...
|
// Configure designer options ...
|
||||||
let persistence;
|
let persistence;
|
||||||
if (!global.memoryPersistence && !global.readOnlyMode) {
|
if (!global.memoryPersistence && !global.readOnlyMode) {
|
||||||
@ -25,7 +32,7 @@ if (!global.memoryPersistence && !global.readOnlyMode) {
|
|||||||
|
|
||||||
const options = buildOptions({
|
const options = buildOptions({
|
||||||
persistenceManager: persistence,
|
persistenceManager: persistence,
|
||||||
isReadOnly: global.readOnlyMode || false,
|
readOnly: global.readOnly || false,
|
||||||
mapId: global.mapId,
|
mapId: global.mapId,
|
||||||
zoom: global.userOptions.zoom,
|
zoom: global.userOptions.zoom,
|
||||||
});
|
});
|
||||||
|
@ -3,9 +3,12 @@ import { buildDesigner, buildOptions } from '../../../../src/components/Designer
|
|||||||
import { PersistenceManager, LocalStorageManager } from '../../../../src';
|
import { PersistenceManager, LocalStorageManager } from '../../../../src';
|
||||||
|
|
||||||
const p = new LocalStorageManager('samples/{id}.xml');
|
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);
|
const designer = buildDesigner(options);
|
||||||
designer.addEvent('loadSuccess', () => {
|
designer.addEvent('loadSuccess', () => {
|
||||||
document.getElementById('mindplot').classList.add('ready');
|
document.getElementById('mindplot').classList.add('ready');
|
||||||
|
Loading…
Reference in New Issue
Block a user