Trigger the svgEditorReady after the canvas is ready.
parent
a3dbb7c5af
commit
2fe15e4d3f
|
@ -535,21 +535,6 @@ TODOS
|
||||||
}
|
}
|
||||||
}());
|
}());
|
||||||
|
|
||||||
// For external openers
|
|
||||||
(function() {
|
|
||||||
// let the opener know SVG Edit is ready (now that config is set up)
|
|
||||||
var svgEditorReadyEvent,
|
|
||||||
w = window.opener;
|
|
||||||
if (w) {
|
|
||||||
try {
|
|
||||||
svgEditorReadyEvent = w.document.createEvent('Event');
|
|
||||||
svgEditorReadyEvent.initEvent('svgEditorReady', true, true);
|
|
||||||
w.document.documentElement.dispatchEvent(svgEditorReadyEvent);
|
|
||||||
}
|
|
||||||
catch(e) {}
|
|
||||||
}
|
|
||||||
}());
|
|
||||||
|
|
||||||
var setIcon = editor.setIcon = function(elem, icon_id, forcedSize) {
|
var setIcon = editor.setIcon = function(elem, icon_id, forcedSize) {
|
||||||
var icon = (typeof icon_id === 'string') ? $.getSvgIcon(icon_id, true) : icon_id.clone();
|
var icon = (typeof icon_id === 'string') ? $.getSvgIcon(icon_id, true) : icon_id.clone();
|
||||||
if (!icon) {
|
if (!icon) {
|
||||||
|
@ -809,6 +794,21 @@ TODOS
|
||||||
origSource = '',
|
origSource = '',
|
||||||
paintBox = {fill: null, stroke:null};
|
paintBox = {fill: null, stroke:null};
|
||||||
|
|
||||||
|
// For external openers
|
||||||
|
(function() {
|
||||||
|
// let the opener know SVG Edit is ready (now that config is set up)
|
||||||
|
var svgEditorReadyEvent,
|
||||||
|
w = window.opener;
|
||||||
|
if (w) {
|
||||||
|
try {
|
||||||
|
svgEditorReadyEvent = w.document.createEvent('Event');
|
||||||
|
svgEditorReadyEvent.initEvent('svgEditorReady', true, true);
|
||||||
|
w.document.documentElement.dispatchEvent(svgEditorReadyEvent);
|
||||||
|
}
|
||||||
|
catch(e) {}
|
||||||
|
}
|
||||||
|
}());
|
||||||
|
|
||||||
// This sets up alternative dialog boxes. They mostly work the same way as
|
// This sets up alternative dialog boxes. They mostly work the same way as
|
||||||
// their UI counterparts, expect instead of returning the result, a callback
|
// their UI counterparts, expect instead of returning the result, a callback
|
||||||
// needs to be included that returns the result as its first parameter.
|
// needs to be included that returns the result as its first parameter.
|
||||||
|
|
Loading…
Reference in New Issue