// , noDefaultExtensions: false, // noDefaultExtensions can only be meaningfully used in config.js or in the URL
// , noDefaultExtensions: false, // noDefaultExtensions can only be meaningfully used in config.js or in the URL
});
});
// OTHER CONFIG
// OTHER CONFIG
svgEditor.setConfig({
svgEditor.setConfig({
// canvasName: 'default',
// canvasName: 'default',
// canvas_expansion: 3,
// canvas_expansion: 3,
// initFill: {
// initFill: {
// color: 'FF0000', // solid red
// color: 'FF0000', // solid red
// opacity: 1
// opacity: 1
// },
// },
// initStroke: {
// initStroke: {
// width: 5,
// width: 5,
// color: '000000', // solid black
// color: '000000', // solid black
// opacity: 1
// opacity: 1
// },
// },
// initOpacity: 1,
// initOpacity: 1,
// colorPickerCSS: null,
// colorPickerCSS: null,
// initTool: 'select',
// initTool: 'select',
// exportWindowType: 'new', // 'same'
// exportWindowType: 'new', // 'same'
// wireframe: false,
// wireframe: false,
// showlayers: false,
// showlayers: false,
// no_save_warning: false,
no_save_warning:true,
// PATH CONFIGURATION
// PATH CONFIGURATION
// imgPath: 'images/',
// imgPath: 'images/',
// langPath: 'locale/',
// langPath: 'locale/',
// extPath: 'extensions/',
// extPath: 'extensions/',
// jGraduatePath: 'jgraduate/images/',
// jGraduatePath: 'jgraduate/images/',
/*
/*
Uncomment the following to allow at least same domain (embedded) access,
Uncomment the following to allow at least same domain (embedded) access,
including file:// access.
including file:// access.
Setting as `['*']` would allow any domain to access but would be unsafe to
Setting as `['*']` would allow any domain to access but would be unsafe to
data privacy and integrity.
data privacy and integrity.
*/
*/
// allowedOrigins: [window.location.origin || 'null'], // May be 'null' (as a string) when used as a file:// URL
// allowedOrigins: [window.location.origin || 'null'], // May be 'null' (as a string) when used as a file:// URL
// DOCUMENT PROPERTIES
// DOCUMENT PROPERTIES
// dimensions: [640, 480],
// dimensions: [640, 480],
// EDITOR OPTIONS
// EDITOR OPTIONS
// gridSnapping: false,
// gridSnapping: false,
// gridColor: '#000',
// gridColor: '#000',
// baseUnit: 'px',
// baseUnit: 'px',
// snappingStep: 10,
// snappingStep: 10,
// showRulers: true,
// showRulers: true,
// EXTENSION-RELATED (GRID)
// EXTENSION-RELATED (GRID)
// showGrid: false, // Set by ext-grid.js
// showGrid: false, // Set by ext-grid.js
// EXTENSION-RELATED (STORAGE)
// EXTENSION-RELATED (STORAGE)
// noStorageOnLoad: false, // Some interaction with ext-storage.js; prevent even the loading of previously saved local storage
noStorageOnLoad:true,// Some interaction with ext-storage.js; prevent even the loading of previously saved local storage
// forceStorage: false, // Some interaction with ext-storage.js; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not
forceStorage:false// Some interaction with ext-storage.js; strongly discouraged from modification as it bypasses user privacy by preventing them from choosing whether to keep local storage or not
// emptyStorageOnDecline: true, // Used by ext-storage.js; empty any prior storage if the user declines to store
// emptyStorageOnDecline: true, // Used by ext-storage.js; empty any prior storage if the user declines to store
});
});
// PREF CHANGES
// PREF CHANGES
/**
/**
setConfig() can also be used to set preferences in addition to
setConfig() can also be used to set preferences in addition to
configuration (see defaultPrefs in svg-editor.js for a list of
configuration (see defaultPrefs in svg-editor.js for a list of
possible settings), but at least if you are using ext-storage.js
possible settings), but at least if you are using ext-storage.js
to store preferences, it will probably be better to let your
to store preferences, it will probably be better to let your
users control these.
users control these.
As with configuration, one may use allowInitialUserOverride, but
As with configuration, one may use allowInitialUserOverride, but
in the case of preferences, any previously stored preferences
in the case of preferences, any previously stored preferences
will also thereby be enabled to override this setting (and at a
will also thereby be enabled to override this setting (and at a
higher priority than any URL preference setting overrides).
higher priority than any URL preference setting overrides).
Failing to use allowInitialUserOverride will ensure preferences
Failing to use allowInitialUserOverride will ensure preferences
are hard-coded here regardless of URL or prior user storage setting.
are hard-coded here regardless of URL or prior user storage setting.
*/
*/
svgEditor.setConfig(
svgEditor.setConfig(
{
{
// lang: '', // Set dynamically within locale.js if not previously set
// lang: '', // Set dynamically within locale.js if not previously set
// iconsize: '', // Will default to 's' if the window height is smaller than the minimum height and 'm' otherwise
// iconsize: '', // Will default to 's' if the window height is smaller than the minimum height and 'm' otherwise
/**
/**
* When showing the preferences dialog, svg-editor.js currently relies
* When showing the preferences dialog, svg-editor.js currently relies
* on curPrefs instead of $.pref, so allowing an override for bkgd_color
* on curPrefs instead of $.pref, so allowing an override for bkgd_color
* means that this value won't have priority over block auto-detection as
* means that this value won't have priority over block auto-detection as
* far as determining which color shows initially in the preferences
* far as determining which color shows initially in the preferences
* dialog (though it can be changed and saved).
* dialog (though it can be changed and saved).
*/
*/
// bkgd_color: '#FFF',
// bkgd_color: '#FFF',
// bkgd_url: '',
// bkgd_url: '',
// img_save: 'embed',
// img_save: 'embed',
// Only shows in UI as far as alert notices
// Only shows in UI as far as alert notices
// save_notice_done: false,
// save_notice_done: false,
// export_notice_done: false
// export_notice_done: false
}
}
);
);
svgEditor.setConfig(
svgEditor.setConfig(
{
{
// Indicate pref settings here if you wish to allow user storage or URL settings
// Indicate pref settings here if you wish to allow user storage or URL settings
// to be able to override your default preferences (unless other config options
// to be able to override your default preferences (unless other config options
// have already explicitly prevented one or the other)
// have already explicitly prevented one or the other)