- npm: Update devDeps

- Build: Update `dist`
master
Brett Zamir 2018-07-18 20:23:10 -07:00
parent a3f0b8e501
commit 8a4bca4e32
69 changed files with 327 additions and 1061 deletions

View File

@ -238,6 +238,12 @@ var svgEditorExtension_shapes = (function () {
'margin-top': -(h / 2 - 15),
'margin-left': 3
});
// Now add shape categories from locale
var cats = {};
for (var o in categories) {
cats['#shape_cats [data-cat="' + o + '"]'] = categories[o];
}
this.setStrings('content', cats);
},
mouseDown: function mouseDown(opts) {
var mode = canv.getMode();

View File

@ -53,40 +53,68 @@ var svgEditorExtension_webappfind = (function () {
case 2:
strings = _context.sent;
svgEditor = this;
// Todo: Update to new API once released
saveMessage = 'save', readMessage = 'read', excludedMessages = [readMessage, saveMessage];
pathID = void 0;
window.addEventListener('message', function (e) {
if (e.origin !== window.location.origin || // PRIVACY AND SECURITY! (for viewing and saving, respectively)
!Array.isArray(e.data) || excludedMessages.includes(e.data[0]) // Validate format and avoid our post below
) {
return;
}
var messageType = e.data[0];
var svgString = void 0;
switch (messageType) {
case 'webapp-view':
this.canvas.bind('message',
/**
* @param {external:Window} win
* @param {module:svgcanvas.SvgCanvas#event:message} data
* @listens module:svgcanvas.SvgCanvas#event:message
* @throws {Error} Unexpected event type
* @returns {undefined}
*/
function (win, _ref3) {
var data = _ref3.data,
origin = _ref3.origin;
// console.log('data, origin', data, origin);
var type = void 0,
content = void 0;
try {
// May throw if data is not an object
var _data$webappfind = data.webappfind;
type = _data$webappfind.type;
pathID = _data$webappfind.pathID;
content = _data$webappfind.content;
if (origin !== location.origin || // We are only interested in a message sent as though within this URL by our browser add-on
excludedMessages.includes(type) // Avoid our post below (other messages might be possible in the future which may also need to be excluded if your subsequent code makes assumptions on the type of message this is)
) {
return;
}
} catch (err) {
return;
}
switch (type) {
case 'view':
// Populate the contents
pathID = e.data[1];
svgString = e.data[2];
svgEditor.loadFromString(svgString);
svgEditor.loadFromString(content);
/* if ($('#tool_save_file')) {
$('#tool_save_file').disabled = false;
} */
break;
case 'webapp-save-end':
alert('save complete for pathID ' + e.data[1] + '!');
case 'save-end':
alert('save complete for pathID ' + pathID + '!');
break;
default:
throw new Error('Unexpected mode');
throw new Error('Unexpected WebAppFind event type');
}
}, false);
saveMessage = 'webapp-save', readMessage = 'webapp-read', excludedMessages = [readMessage, saveMessage];
pathID = void 0;
});
window.postMessage([readMessage], window.location.origin !== 'null' ? window.location.origin : '*'); // Avoid "null" string error for file: protocol (even though file protocol not currently supported by add-on)
/*
window.postMessage({
webappfind: {
type: readMessage
}
}, window.location.origin === 'null'
// Avoid "null" string error for `file:` protocol (even though
// file protocol not currently supported by Firefox)
? '*'
: window.location.origin
);
*/
buttons = [{
id: 'webappfind_save', //
type: 'app_menu',
@ -97,7 +125,16 @@ var svgEditorExtension_webappfind = (function () {
// Not ready yet as haven't received first payload
return;
}
window.postMessage([saveMessage, pathID, svgEditor.canvas.getSvgString()], window.location.origin);
window.postMessage({
webappfind: {
type: saveMessage,
pathID: pathID,
content: svgEditor.canvas.getSvgString()
}
}, window.location.origin === 'null'
// Avoid "null" string error for `file:` protocol (even
// though file protocol not currently supported by add-on)
? '*' : window.location.origin);
}
}
}];
@ -109,7 +146,7 @@ var svgEditorExtension_webappfind = (function () {
})
});
case 10:
case 9:
case 'end':
return _context.stop();
}

110
dist/index-es.js vendored
View File

@ -12838,7 +12838,7 @@ function SvgCanvas(container, config) {
* The "implements" should really be an intersection applying to all types rather than a union
* @function module:svgcanvas.SvgCanvas#call
* @implements {module:draw.DrawCanvasInit#call|module:path.EditorContext#call}
* @param {"selected"|"changed"|"contextset"|"pointsAdded"|"extension_added"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String with the event name
* @param {"selected"|"changed"|"contextset"|"pointsAdded"|"extension_added"|"extensions_added"|"message"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String with the event name
* @param {module:svgcanvas.SvgCanvas#event:GenericCanvasEvent} arg - Argument to pass through to the callback function.
* @returns {undefined}
*/
@ -13644,6 +13644,19 @@ function SvgCanvas(container, config) {
* @event module:svgcanvas.SvgCanvas#event:extension_added
* @type {module:svgcanvas.ExtensionInitResponsePlusName|undefined}
*/
/**
* @event module:svgcanvas.SvgCanvas#event:extensions_added
* @type {undefined}
*/
/**
* @typedef {PlainObject} module:svgcanvas.Message
* @property {Any} data The data
* @property {string} origin The origin
*/
/**
* @event module:svgcanvas.SvgCanvas#event:message
* @type {module:svgcanvas.Message}
*/
/**
* SVG canvas converted to string
* @event module:svgcanvas.SvgCanvas#event:saved
@ -13676,9 +13689,9 @@ function SvgCanvas(container, config) {
*/
/**
* Creating a cover-all class until {@link https://github.com/jsdoc3/jsdoc/issues/1545} may be supported.
* `undefined` may be returned by {@link module:svgcanvas.SvgCanvas#event:extension_added} if the extension's `init` returns `undefined` It is also the type for the following events "zoomDone", "unsetnonce", "cleared".
* `undefined` may be returned by {@link module:svgcanvas.SvgCanvas#event:extension_added} if the extension's `init` returns `undefined` It is also the type for the following events "zoomDone", "unsetnonce", "cleared", and "extensions_added".
* @event module:svgcanvas.SvgCanvas#event:GenericCanvasEvent
* @type {module:svgcanvas.SvgCanvas#event:selected|module:svgcanvas.SvgCanvas#event:changed|module:svgcanvas.SvgCanvas#event:contextset|module:svgcanvas.SvgCanvas#event:pointsAdded|module:svgcanvas.SvgCanvas#event:extension_added|module:svgcanvas.SvgCanvas#event:transition|module:svgcanvas.SvgCanvas#event:zoomed|module:svgcanvas.SvgCanvas#event:updateCanvas|module:svgcanvas.SvgCanvas#event:saved|module:svgcanvas.SvgCanvas#event:exported|module:svgcanvas.SvgCanvas#event:exportedPDF|module:svgcanvas.SvgCanvas#event:setnonce|module:svgcanvas.SvgCanvas#event:unsetnonce|undefined}
* @type {module:svgcanvas.SvgCanvas#event:selected|module:svgcanvas.SvgCanvas#event:changed|module:svgcanvas.SvgCanvas#event:contextset|module:svgcanvas.SvgCanvas#event:pointsAdded|module:svgcanvas.SvgCanvas#event:extension_added|module:svgcanvas.SvgCanvas#event:extensions_added|module:svgcanvas.SvgCanvas#event:message|module:svgcanvas.SvgCanvas#event:transition|module:svgcanvas.SvgCanvas#event:zoomed|module:svgcanvas.SvgCanvas#event:updateCanvas|module:svgcanvas.SvgCanvas#event:saved|module:svgcanvas.SvgCanvas#event:exported|module:svgcanvas.SvgCanvas#event:exportedPDF|module:svgcanvas.SvgCanvas#event:setnonce|module:svgcanvas.SvgCanvas#event:unsetnonce|undefined}
*/
/**
@ -13691,7 +13704,7 @@ function SvgCanvas(container, config) {
/**
* Attaches a callback function to an event
* @function module:svgcanvas.SvgCanvas#bind
* @param {"changed"|"contextset"|"selected"|"pointsAdded"|"extension_added"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String indicating the name of the event
* @param {"changed"|"contextset"|"selected"|"pointsAdded"|"extension_added"|"extensions_added"|"message"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String indicating the name of the event
* @param {module:svgcanvas.EventHandler} f - The callback function to bind to the event
* @returns {module:svgcanvas.EventHandler} The previous event
*/
@ -24400,7 +24413,7 @@ var langParam = void 0;
* @param {boolean} ids
* @returns {undefined}
*/
function setStrings(type, obj, ids) {
var setStrings = function setStrings(type, obj, ids) {
// Root element to look for element from
var parent = $$a('#svg_editor').parent();
Object.entries(obj).forEach(function (_ref) {
@ -24437,7 +24450,7 @@ function setStrings(type, obj, ids) {
console.log('Missing: ' + sel);
}
});
}
};
/**
* The "data" property is generally set to an an array of objects with
@ -24480,7 +24493,7 @@ var init$7 = function init(editor) {
*/
var readLang = function () {
var _ref3 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(langData) {
var more, _langData, tools, properties, config, layers, common, ui, cats, o, opts;
var more, _langData, tools, properties, config, layers, common, ui, opts;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
@ -24580,20 +24593,6 @@ var readLang = function () {
svginfo_grid_color: config.grid_color
}, true);
// Shape categories
cats = {};
for (o in langData.shape_cats) {
cats['#shape_cats [data-cat="' + o + '"]'] = langData.shape_cats[o];
}
// TODO: Find way to make this run after shapelib ext has loaded;
// may be possible now as Promise within the extension using
// `importLocale`
setTimeout(function () {
setStrings('content', cats);
}, 2000);
// Context menus
opts = {};
@ -24711,7 +24710,7 @@ var readLang = function () {
return _context.abrupt('return', { langParam: langParam, langData: langData });
case 18:
case 15:
case 'end':
return _context.stop();
}
@ -24910,6 +24909,7 @@ function loadStylesheets(stylesheets) {
* @exports module:SVGEditor
* @borrows module:locale.putLocale as putLocale
* @borrows module:locale.readLang as readLang
* @borrows module:locale.setStrings as setStrings
*/
var editor = {};
@ -25296,9 +25296,10 @@ $$b.pref = function (key, val) {
*/
editor.putLocale = putLocale;
editor.readLang = readLang;
editor.setStrings = setStrings;
/**
* Where permitted, sets canvas and/or defaultPrefs based on previous
* Where permitted, sets canvas and/or `defaultPrefs` based on previous
* storage. This will override URL settings (for security reasons) but
* not `svgedit-config-iife.js` configuration (unless initial user
* overriding is explicitly permitted there via `allowInitialUserOverride`).
@ -25654,6 +25655,7 @@ editor.init = function () {
* @fires module:svgcanvas.SvgCanvas#event:ext-addLangData
* @fires module:svgcanvas.SvgCanvas#event:ext-langReady
* @fires module:svgcanvas.SvgCanvas#event:ext-langChanged
* @fires module:svgcanvas.SvgCanvas#event:extensions_added
* @returns {Promise} Resolves to result of {@link module:locale.readLang}
*/
var extAndLocaleFunc = function () {
@ -25739,21 +25741,41 @@ editor.init = function () {
}()));
case 9:
_context4.next = 14;
svgCanvas.bind('extensions_added',
/**
* @param {external:Window} win
* @param {module:svgcanvas.SvgCanvas#event:extensions_added} data
* @listens module:svgcanvas.SvgCanvas#event:extensions_added
* @returns {undefined}
*/
function (win, data) {
extensionsAdded = true;
messageQueue.forEach(
/**
* @param {module:svgcanvas.SvgCanvas#event:message} messageObj
* @fires module:svgcanvas.SvgCanvas#event:message
* @returns {undefined}
*/
function (messageObj) {
svgCanvas.call('message', messageObj);
});
});
svgCanvas.call('extensions_added');
_context4.next = 16;
break;
case 11:
_context4.prev = 11;
case 13:
_context4.prev = 13;
_context4.t0 = _context4['catch'](6);
console.log(_context4.t0);
case 14:
case 16:
case 'end':
return _context4.stop();
}
}
}, _callee4, this, [[6, 11]]);
}, _callee4, this, [[6, 13]]);
}));
return function extAndLocaleFunc() {
@ -30854,15 +30876,17 @@ editor.loadFromDataURI = function (str) {
* @param {string} name Used internally; no need for i18n.
* @param {module:svgcanvas.ExtensionInitCallback} init Config to be invoked on this module
* @param {module:SVGEditor~ImportLocale} importLocale Importer defaulting to pth with current extension name and locale
* @returns {undefined}
* @throws {Error} If called too early
* @returns {Promise} Resolves to `undefined`
*/
editor.addExtension = function (name, init$$1, importLocale) {
// Note that we don't want this on editor.ready since some extensions
// may want to run before then (like server_opensave).
// $(function () {
if (svgCanvas) {
svgCanvas.addExtension.call(this, name, init$$1, importLocale);
if (!svgCanvas) {
throw new Error('Extension added too early');
}
return svgCanvas.addExtension.call(this, name, init$$1, importLocale);
// });
};
@ -30872,6 +30896,30 @@ editor.ready(function () {
injectExtendedContextMenuItemsIntoDom();
});
var extensionsAdded = false;
var messageQueue = [];
/**
* @param {Any} data
* @param {string} origin
* @fires module:svgcanvas.SvgCanvas#event:message
* @returns {undefined}
*/
var messageListener = function messageListener(_ref11) {
var data = _ref11.data,
origin = _ref11.origin;
// console.log('data, origin, extensionsAdded', data, origin, extensionsAdded);
var messageObj = { data: data, origin: origin };
if (!extensionsAdded) {
messageQueue.push(messageObj);
} else {
// Extensions can handle messages at this stage with their own
// canvas `message` listeners
svgCanvas.call('message', messageObj);
}
};
window.addEventListener('message', messageListener);
// Run init once DOM is loaded
// jQuery(editor.init);
Promise.resolve().then(function () {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

110
dist/index-umd.js vendored
View File

@ -12844,7 +12844,7 @@
* The "implements" should really be an intersection applying to all types rather than a union
* @function module:svgcanvas.SvgCanvas#call
* @implements {module:draw.DrawCanvasInit#call|module:path.EditorContext#call}
* @param {"selected"|"changed"|"contextset"|"pointsAdded"|"extension_added"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String with the event name
* @param {"selected"|"changed"|"contextset"|"pointsAdded"|"extension_added"|"extensions_added"|"message"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String with the event name
* @param {module:svgcanvas.SvgCanvas#event:GenericCanvasEvent} arg - Argument to pass through to the callback function.
* @returns {undefined}
*/
@ -13650,6 +13650,19 @@
* @event module:svgcanvas.SvgCanvas#event:extension_added
* @type {module:svgcanvas.ExtensionInitResponsePlusName|undefined}
*/
/**
* @event module:svgcanvas.SvgCanvas#event:extensions_added
* @type {undefined}
*/
/**
* @typedef {PlainObject} module:svgcanvas.Message
* @property {Any} data The data
* @property {string} origin The origin
*/
/**
* @event module:svgcanvas.SvgCanvas#event:message
* @type {module:svgcanvas.Message}
*/
/**
* SVG canvas converted to string
* @event module:svgcanvas.SvgCanvas#event:saved
@ -13682,9 +13695,9 @@
*/
/**
* Creating a cover-all class until {@link https://github.com/jsdoc3/jsdoc/issues/1545} may be supported.
* `undefined` may be returned by {@link module:svgcanvas.SvgCanvas#event:extension_added} if the extension's `init` returns `undefined` It is also the type for the following events "zoomDone", "unsetnonce", "cleared".
* `undefined` may be returned by {@link module:svgcanvas.SvgCanvas#event:extension_added} if the extension's `init` returns `undefined` It is also the type for the following events "zoomDone", "unsetnonce", "cleared", and "extensions_added".
* @event module:svgcanvas.SvgCanvas#event:GenericCanvasEvent
* @type {module:svgcanvas.SvgCanvas#event:selected|module:svgcanvas.SvgCanvas#event:changed|module:svgcanvas.SvgCanvas#event:contextset|module:svgcanvas.SvgCanvas#event:pointsAdded|module:svgcanvas.SvgCanvas#event:extension_added|module:svgcanvas.SvgCanvas#event:transition|module:svgcanvas.SvgCanvas#event:zoomed|module:svgcanvas.SvgCanvas#event:updateCanvas|module:svgcanvas.SvgCanvas#event:saved|module:svgcanvas.SvgCanvas#event:exported|module:svgcanvas.SvgCanvas#event:exportedPDF|module:svgcanvas.SvgCanvas#event:setnonce|module:svgcanvas.SvgCanvas#event:unsetnonce|undefined}
* @type {module:svgcanvas.SvgCanvas#event:selected|module:svgcanvas.SvgCanvas#event:changed|module:svgcanvas.SvgCanvas#event:contextset|module:svgcanvas.SvgCanvas#event:pointsAdded|module:svgcanvas.SvgCanvas#event:extension_added|module:svgcanvas.SvgCanvas#event:extensions_added|module:svgcanvas.SvgCanvas#event:message|module:svgcanvas.SvgCanvas#event:transition|module:svgcanvas.SvgCanvas#event:zoomed|module:svgcanvas.SvgCanvas#event:updateCanvas|module:svgcanvas.SvgCanvas#event:saved|module:svgcanvas.SvgCanvas#event:exported|module:svgcanvas.SvgCanvas#event:exportedPDF|module:svgcanvas.SvgCanvas#event:setnonce|module:svgcanvas.SvgCanvas#event:unsetnonce|undefined}
*/
/**
@ -13697,7 +13710,7 @@
/**
* Attaches a callback function to an event
* @function module:svgcanvas.SvgCanvas#bind
* @param {"changed"|"contextset"|"selected"|"pointsAdded"|"extension_added"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String indicating the name of the event
* @param {"changed"|"contextset"|"selected"|"pointsAdded"|"extension_added"|"extensions_added"|"message"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String indicating the name of the event
* @param {module:svgcanvas.EventHandler} f - The callback function to bind to the event
* @returns {module:svgcanvas.EventHandler} The previous event
*/
@ -24406,7 +24419,7 @@
* @param {boolean} ids
* @returns {undefined}
*/
function setStrings(type, obj, ids) {
var setStrings = function setStrings(type, obj, ids) {
// Root element to look for element from
var parent = $$a('#svg_editor').parent();
Object.entries(obj).forEach(function (_ref) {
@ -24443,7 +24456,7 @@
console.log('Missing: ' + sel);
}
});
}
};
/**
* The "data" property is generally set to an an array of objects with
@ -24486,7 +24499,7 @@
*/
var readLang = function () {
var _ref3 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(langData) {
var more, _langData, tools, properties, config, layers, common, ui, cats, o, opts;
var more, _langData, tools, properties, config, layers, common, ui, opts;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
@ -24586,20 +24599,6 @@
svginfo_grid_color: config.grid_color
}, true);
// Shape categories
cats = {};
for (o in langData.shape_cats) {
cats['#shape_cats [data-cat="' + o + '"]'] = langData.shape_cats[o];
}
// TODO: Find way to make this run after shapelib ext has loaded;
// may be possible now as Promise within the extension using
// `importLocale`
setTimeout(function () {
setStrings('content', cats);
}, 2000);
// Context menus
opts = {};
@ -24717,7 +24716,7 @@
return _context.abrupt('return', { langParam: langParam, langData: langData });
case 18:
case 15:
case 'end':
return _context.stop();
}
@ -24916,6 +24915,7 @@
* @exports module:SVGEditor
* @borrows module:locale.putLocale as putLocale
* @borrows module:locale.readLang as readLang
* @borrows module:locale.setStrings as setStrings
*/
var editor = {};
@ -25302,9 +25302,10 @@
*/
editor.putLocale = putLocale;
editor.readLang = readLang;
editor.setStrings = setStrings;
/**
* Where permitted, sets canvas and/or defaultPrefs based on previous
* Where permitted, sets canvas and/or `defaultPrefs` based on previous
* storage. This will override URL settings (for security reasons) but
* not `svgedit-config-iife.js` configuration (unless initial user
* overriding is explicitly permitted there via `allowInitialUserOverride`).
@ -25660,6 +25661,7 @@
* @fires module:svgcanvas.SvgCanvas#event:ext-addLangData
* @fires module:svgcanvas.SvgCanvas#event:ext-langReady
* @fires module:svgcanvas.SvgCanvas#event:ext-langChanged
* @fires module:svgcanvas.SvgCanvas#event:extensions_added
* @returns {Promise} Resolves to result of {@link module:locale.readLang}
*/
var extAndLocaleFunc = function () {
@ -25745,21 +25747,41 @@
}()));
case 9:
_context4.next = 14;
svgCanvas.bind('extensions_added',
/**
* @param {external:Window} win
* @param {module:svgcanvas.SvgCanvas#event:extensions_added} data
* @listens module:svgcanvas.SvgCanvas#event:extensions_added
* @returns {undefined}
*/
function (win, data) {
extensionsAdded = true;
messageQueue.forEach(
/**
* @param {module:svgcanvas.SvgCanvas#event:message} messageObj
* @fires module:svgcanvas.SvgCanvas#event:message
* @returns {undefined}
*/
function (messageObj) {
svgCanvas.call('message', messageObj);
});
});
svgCanvas.call('extensions_added');
_context4.next = 16;
break;
case 11:
_context4.prev = 11;
case 13:
_context4.prev = 13;
_context4.t0 = _context4['catch'](6);
console.log(_context4.t0);
case 14:
case 16:
case 'end':
return _context4.stop();
}
}
}, _callee4, this, [[6, 11]]);
}, _callee4, this, [[6, 13]]);
}));
return function extAndLocaleFunc() {
@ -30860,15 +30882,17 @@
* @param {string} name Used internally; no need for i18n.
* @param {module:svgcanvas.ExtensionInitCallback} init Config to be invoked on this module
* @param {module:SVGEditor~ImportLocale} importLocale Importer defaulting to pth with current extension name and locale
* @returns {undefined}
* @throws {Error} If called too early
* @returns {Promise} Resolves to `undefined`
*/
editor.addExtension = function (name, init$$1, importLocale) {
// Note that we don't want this on editor.ready since some extensions
// may want to run before then (like server_opensave).
// $(function () {
if (svgCanvas) {
svgCanvas.addExtension.call(this, name, init$$1, importLocale);
if (!svgCanvas) {
throw new Error('Extension added too early');
}
return svgCanvas.addExtension.call(this, name, init$$1, importLocale);
// });
};
@ -30878,6 +30902,30 @@
injectExtendedContextMenuItemsIntoDom();
});
var extensionsAdded = false;
var messageQueue = [];
/**
* @param {Any} data
* @param {string} origin
* @fires module:svgcanvas.SvgCanvas#event:message
* @returns {undefined}
*/
var messageListener = function messageListener(_ref11) {
var data = _ref11.data,
origin = _ref11.origin;
// console.log('data, origin, extensionsAdded', data, origin, extensionsAdded);
var messageObj = { data: data, origin: origin };
if (!extensionsAdded) {
messageQueue.push(messageObj);
} else {
// Extensions can handle messages at this stage with their own
// canvas `message` listeners
svgCanvas.call('message', messageObj);
}
};
window.addEventListener('message', messageListener);
// Run init once DOM is loaded
// jQuery(editor.init);
Promise.resolve().then(function () {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -188,22 +188,6 @@ var svgEditorLang_af = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_ar = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_az = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_be = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_bg = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_ca = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_cs = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_cy = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_da = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_de = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_el = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -189,22 +189,6 @@ var svgEditorLang_en = (function () {
snapping_stepsize: 'Snapping Step-Size:',
grid_color: 'Grid color:'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'Dialog balloons',
electronics: 'Electronics',
math: 'Mathematical',
music: 'Music',
misc: 'Miscellaneous',
raphael_1: 'raphaeljs.com set 1',
raphael_2: 'raphaeljs.com set 2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_es = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_et = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -186,22 +186,6 @@ var svgEditorLang_fa = (function () {
snapping_stepsize: 'Snapping Step-Size:',
grid_color: 'Grid color'
},
shape_cats: {
basic: 'Basic',
object: 'Objects',
symbol: 'Symbols',
arrow: 'Arrows',
flowchart: 'Flowchart',
animal: 'Animals',
game: 'Cards & Chess',
dialog_balloon: 'Dialog balloons',
electronics: 'Electronics',
math: 'Mathematical',
music: 'Music',
misc: 'Miscellaneous',
raphael_1: 'raphaeljs.com set 1',
raphael_2: 'raphaeljs.com set 2'
},
notification: {
invalidAttrValGiven: '‫مقدار داده شده نامعتبر است‬',
noContentToFitTo: '‫محتوایی برای هم اندازه شدن وجود ندارد‬',

View File

@ -188,22 +188,6 @@ var svgEditorLang_fi = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_fr = (function () {
snapping_stepsize: "Pas d'ancrage :",
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: "Il n'y a pas de contenu auquel ajuster",

View File

@ -188,22 +188,6 @@ var svgEditorLang_fy = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_ga = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_gl = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_he = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_hi = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_hr = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_hu = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_hy = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_id = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_is = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_it = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: "Non c'è contenuto cui adeguarsi",

View File

@ -188,22 +188,6 @@ var svgEditorLang_ja = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_ko = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_lt = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_lv = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_mk = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_ms = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_mt = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_nl = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_no = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_pl = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -187,22 +187,6 @@ var svgEditorLang_pt_BR = (function () {
snapping_onoff: 'snapping_onoff',
snapping_stepsize: 'snapping_stepsize'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_pt_PT = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -187,22 +187,6 @@ var svgEditorLang_ro = (function () {
snapping_onoff: 'snapping_onoff',
snapping_stepsize: 'snapping_stepsize'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_ru = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_sk = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -187,22 +187,6 @@ var svgEditorLang_sl = (function () {
snapping_onoff: 'snapping_onoff',
snapping_stepsize: 'snapping_stepsize'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_sq = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_sr = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_sv = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_sw = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_test = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_th = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_tl = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_tr = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_uk = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_vi = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_yi = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_zh_CN = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_zh_HK = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

View File

@ -188,22 +188,6 @@ var svgEditorLang_zh_TW = (function () {
snapping_stepsize: 'snapping_stepsize',
grid_color: 'grid_color'
},
shape_cats: {
basic: 'basic',
object: 'object',
symbol: 'symbol',
arrow: 'arrow',
flowchart: 'flowchart',
animal: 'animal',
game: 'game',
dialog_balloon: 'dialog_balloon',
electronics: 'electronics',
math: 'math',
music: 'music',
misc: 'misc',
raphael_1: 'raphael_1',
raphael_2: 'raphael_2'
},
notification: {
invalidAttrValGiven: 'Invalid value given',
noContentToFitTo: 'No content to fit to',

25
package-lock.json generated
View File

@ -49,6 +49,12 @@
"samsam": "1.3.0"
}
},
"@sinonjs/samsam": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.0.0.tgz",
"integrity": "sha512-D7VxhADdZbDJ0HjUTMnSQ5xIGb4H2yWpg8k9Sf1T08zfFiQYlaxM8LZydpR4FQ2E6LZJX8IlabNZ5io4vdChwg==",
"dev": true
},
"@types/estree": {
"version": "0.0.39",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
@ -4351,9 +4357,9 @@
"dev": true
},
"lolex": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz",
"integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz",
"integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==",
"dev": true
},
"loose-envify": {
@ -5544,9 +5550,9 @@
}
},
"rollup": {
"version": "0.62.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-0.62.0.tgz",
"integrity": "sha512-mZS0aIGfYzuJySJD78znu9/hCJsNfBzg4lDuZGMj0hFVcYHt2evNRHv8aqiu9/w6z6Qn8AQoVl4iyEjDmisGeA==",
"version": "0.63.2",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-0.63.2.tgz",
"integrity": "sha512-Tdo4DggL3QT+Im5r0QXWBGsBdlaBNWQ+fH8pIsOBvy3U7TXFLqMzUBmJBLBc7r8UM0GO5I/Nl9jK7AC2QQAjEQ==",
"dev": true,
"requires": {
"@types/estree": "0.0.39",
@ -5900,12 +5906,13 @@
"dev": true
},
"sinon": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.0.tgz",
"integrity": "sha512-BSt7qfCyoqMcPVK0c+olyjaa2DB0DTyOBpHmGC3goiHmNa8NE+4/ZJlUi693VS0WPgvR0rc6nYvASXYZMiibhw==",
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.3.tgz",
"integrity": "sha512-yeTza8xIZZdiXntCHJAzKll/sSYE+DuJOS8hiSapzaLqdW8eCNVVC9je9SZYYTkPm2bLts9x6UYxwuMAVVrM6Q==",
"dev": true,
"requires": {
"@sinonjs/formatio": "^2.0.0",
"@sinonjs/samsam": "^2.0.0",
"diff": "^3.5.0",
"lodash.get": "^4.4.2",
"lolex": "^2.4.2",

View File

@ -70,7 +70,7 @@
"node-static": "^0.7.10",
"opn-cli": "^3.1.0",
"qunit": "^2.6.1",
"rollup": "0.62.0",
"rollup": "0.63.2",
"rollup-plugin-babel": "^3.0.7",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-json": "^3.0.0",
@ -78,7 +78,7 @@
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-re": "^1.0.7",
"rollup-plugin-uglify": "^4.0.0",
"sinon": "^6.1.0",
"sinon": "^6.1.3",
"sinon-test": "https://github.com/brettz9/sinon-test#es6-modules",
"uglify-es": "^3.3.9"
}

View File

@ -12841,7 +12841,7 @@
* The "implements" should really be an intersection applying to all types rather than a union
* @function module:svgcanvas.SvgCanvas#call
* @implements {module:draw.DrawCanvasInit#call|module:path.EditorContext#call}
* @param {"selected"|"changed"|"contextset"|"pointsAdded"|"extension_added"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String with the event name
* @param {"selected"|"changed"|"contextset"|"pointsAdded"|"extension_added"|"extensions_added"|"message"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String with the event name
* @param {module:svgcanvas.SvgCanvas#event:GenericCanvasEvent} arg - Argument to pass through to the callback function.
* @returns {undefined}
*/
@ -13647,6 +13647,19 @@
* @event module:svgcanvas.SvgCanvas#event:extension_added
* @type {module:svgcanvas.ExtensionInitResponsePlusName|undefined}
*/
/**
* @event module:svgcanvas.SvgCanvas#event:extensions_added
* @type {undefined}
*/
/**
* @typedef {PlainObject} module:svgcanvas.Message
* @property {Any} data The data
* @property {string} origin The origin
*/
/**
* @event module:svgcanvas.SvgCanvas#event:message
* @type {module:svgcanvas.Message}
*/
/**
* SVG canvas converted to string
* @event module:svgcanvas.SvgCanvas#event:saved
@ -13679,9 +13692,9 @@
*/
/**
* Creating a cover-all class until {@link https://github.com/jsdoc3/jsdoc/issues/1545} may be supported.
* `undefined` may be returned by {@link module:svgcanvas.SvgCanvas#event:extension_added} if the extension's `init` returns `undefined` It is also the type for the following events "zoomDone", "unsetnonce", "cleared".
* `undefined` may be returned by {@link module:svgcanvas.SvgCanvas#event:extension_added} if the extension's `init` returns `undefined` It is also the type for the following events "zoomDone", "unsetnonce", "cleared", and "extensions_added".
* @event module:svgcanvas.SvgCanvas#event:GenericCanvasEvent
* @type {module:svgcanvas.SvgCanvas#event:selected|module:svgcanvas.SvgCanvas#event:changed|module:svgcanvas.SvgCanvas#event:contextset|module:svgcanvas.SvgCanvas#event:pointsAdded|module:svgcanvas.SvgCanvas#event:extension_added|module:svgcanvas.SvgCanvas#event:transition|module:svgcanvas.SvgCanvas#event:zoomed|module:svgcanvas.SvgCanvas#event:updateCanvas|module:svgcanvas.SvgCanvas#event:saved|module:svgcanvas.SvgCanvas#event:exported|module:svgcanvas.SvgCanvas#event:exportedPDF|module:svgcanvas.SvgCanvas#event:setnonce|module:svgcanvas.SvgCanvas#event:unsetnonce|undefined}
* @type {module:svgcanvas.SvgCanvas#event:selected|module:svgcanvas.SvgCanvas#event:changed|module:svgcanvas.SvgCanvas#event:contextset|module:svgcanvas.SvgCanvas#event:pointsAdded|module:svgcanvas.SvgCanvas#event:extension_added|module:svgcanvas.SvgCanvas#event:extensions_added|module:svgcanvas.SvgCanvas#event:message|module:svgcanvas.SvgCanvas#event:transition|module:svgcanvas.SvgCanvas#event:zoomed|module:svgcanvas.SvgCanvas#event:updateCanvas|module:svgcanvas.SvgCanvas#event:saved|module:svgcanvas.SvgCanvas#event:exported|module:svgcanvas.SvgCanvas#event:exportedPDF|module:svgcanvas.SvgCanvas#event:setnonce|module:svgcanvas.SvgCanvas#event:unsetnonce|undefined}
*/
/**
@ -13694,7 +13707,7 @@
/**
* Attaches a callback function to an event
* @function module:svgcanvas.SvgCanvas#bind
* @param {"changed"|"contextset"|"selected"|"pointsAdded"|"extension_added"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String indicating the name of the event
* @param {"changed"|"contextset"|"selected"|"pointsAdded"|"extension_added"|"extensions_added"|"message"|"transition"|"zoomed"|"updateCanvas"|"zoomDone"|"saved"|"exported"|"exportedPDF"|"setnonce"|"unsetnonce"|"cleared"} ev - String indicating the name of the event
* @param {module:svgcanvas.EventHandler} f - The callback function to bind to the event
* @returns {module:svgcanvas.EventHandler} The previous event
*/
@ -24403,7 +24416,7 @@
* @param {boolean} ids
* @returns {undefined}
*/
function setStrings(type, obj, ids) {
var setStrings = function setStrings(type, obj, ids) {
// Root element to look for element from
var parent = $$a('#svg_editor').parent();
Object.entries(obj).forEach(function (_ref) {
@ -24440,7 +24453,7 @@
console.log('Missing: ' + sel);
}
});
}
};
/**
* The "data" property is generally set to an an array of objects with
@ -24483,7 +24496,7 @@
*/
var readLang = function () {
var _ref3 = asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(langData) {
var more, _langData, tools, properties, config, layers, common, ui, cats, o, opts;
var more, _langData, tools, properties, config, layers, common, ui, opts;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
@ -24583,20 +24596,6 @@
svginfo_grid_color: config.grid_color
}, true);
// Shape categories
cats = {};
for (o in langData.shape_cats) {
cats['#shape_cats [data-cat="' + o + '"]'] = langData.shape_cats[o];
}
// TODO: Find way to make this run after shapelib ext has loaded;
// may be possible now as Promise within the extension using
// `importLocale`
setTimeout(function () {
setStrings('content', cats);
}, 2000);
// Context menus
opts = {};
@ -24714,7 +24713,7 @@
return _context.abrupt('return', { langParam: langParam, langData: langData });
case 18:
case 15:
case 'end':
return _context.stop();
}
@ -24913,6 +24912,7 @@
* @exports module:SVGEditor
* @borrows module:locale.putLocale as putLocale
* @borrows module:locale.readLang as readLang
* @borrows module:locale.setStrings as setStrings
*/
var editor = {};
@ -25299,9 +25299,10 @@
*/
editor.putLocale = putLocale;
editor.readLang = readLang;
editor.setStrings = setStrings;
/**
* Where permitted, sets canvas and/or defaultPrefs based on previous
* Where permitted, sets canvas and/or `defaultPrefs` based on previous
* storage. This will override URL settings (for security reasons) but
* not `svgedit-config-iife.js` configuration (unless initial user
* overriding is explicitly permitted there via `allowInitialUserOverride`).
@ -25657,6 +25658,7 @@
* @fires module:svgcanvas.SvgCanvas#event:ext-addLangData
* @fires module:svgcanvas.SvgCanvas#event:ext-langReady
* @fires module:svgcanvas.SvgCanvas#event:ext-langChanged
* @fires module:svgcanvas.SvgCanvas#event:extensions_added
* @returns {Promise} Resolves to result of {@link module:locale.readLang}
*/
var extAndLocaleFunc = function () {
@ -25742,21 +25744,41 @@
}()));
case 9:
_context4.next = 14;
svgCanvas.bind('extensions_added',
/**
* @param {external:Window} win
* @param {module:svgcanvas.SvgCanvas#event:extensions_added} data
* @listens module:svgcanvas.SvgCanvas#event:extensions_added
* @returns {undefined}
*/
function (win, data) {
extensionsAdded = true;
messageQueue.forEach(
/**
* @param {module:svgcanvas.SvgCanvas#event:message} messageObj
* @fires module:svgcanvas.SvgCanvas#event:message
* @returns {undefined}
*/
function (messageObj) {
svgCanvas.call('message', messageObj);
});
});
svgCanvas.call('extensions_added');
_context4.next = 16;
break;
case 11:
_context4.prev = 11;
case 13:
_context4.prev = 13;
_context4.t0 = _context4['catch'](6);
console.log(_context4.t0);
case 14:
case 16:
case 'end':
return _context4.stop();
}
}
}, _callee4, this, [[6, 11]]);
}, _callee4, this, [[6, 13]]);
}));
return function extAndLocaleFunc() {
@ -30857,15 +30879,17 @@
* @param {string} name Used internally; no need for i18n.
* @param {module:svgcanvas.ExtensionInitCallback} init Config to be invoked on this module
* @param {module:SVGEditor~ImportLocale} importLocale Importer defaulting to pth with current extension name and locale
* @returns {undefined}
* @throws {Error} If called too early
* @returns {Promise} Resolves to `undefined`
*/
editor.addExtension = function (name, init$$1, importLocale) {
// Note that we don't want this on editor.ready since some extensions
// may want to run before then (like server_opensave).
// $(function () {
if (svgCanvas) {
svgCanvas.addExtension.call(this, name, init$$1, importLocale);
if (!svgCanvas) {
throw new Error('Extension added too early');
}
return svgCanvas.addExtension.call(this, name, init$$1, importLocale);
// });
};
@ -30875,6 +30899,30 @@
injectExtendedContextMenuItemsIntoDom();
});
var extensionsAdded = false;
var messageQueue = [];
/**
* @param {Any} data
* @param {string} origin
* @fires module:svgcanvas.SvgCanvas#event:message
* @returns {undefined}
*/
var messageListener = function messageListener(_ref11) {
var data = _ref11.data,
origin = _ref11.origin;
// console.log('data, origin, extensionsAdded', data, origin, extensionsAdded);
var messageObj = { data: data, origin: origin };
if (!extensionsAdded) {
messageQueue.push(messageObj);
} else {
// Extensions can handle messages at this stage with their own
// canvas `message` listeners
svgCanvas.call('message', messageObj);
}
};
window.addEventListener('message', messageListener);
// Run init once DOM is loaded
// jQuery(editor.init);
Promise.resolve().then(function () {