Ensure all dependencies available for canvg-using extensions (server_moinsave, server_opensave)
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2849 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
905dac6979
commit
73a4804324
|
@ -32,7 +32,7 @@ svgEditor.addExtension("server_opensave", {
|
|||
var c = $('#export_canvas')[0];
|
||||
c.width = svgCanvas.contentW;
|
||||
c.height = svgCanvas.contentH;
|
||||
$.getScript('canvg/canvg.js', function() {
|
||||
svgEditor.buildCanvgCallback(function () {
|
||||
canvg(c, svg, {renderCallback: function() {
|
||||
var datauri = c.toDataURL('image/png');
|
||||
// var uiStrings = svgEditor.uiStrings;
|
||||
|
@ -48,7 +48,7 @@ svgEditor.addExtension("server_opensave", {
|
|||
.appendTo('body')
|
||||
.submit().remove();
|
||||
}});
|
||||
});
|
||||
})();
|
||||
alert("Saved! Return to Item View!");
|
||||
top.window.location = '/'+name;
|
||||
}
|
||||
|
|
|
@ -68,6 +68,7 @@ svgEditor.addExtension("server_opensave", {
|
|||
|
||||
c.width = svgCanvas.contentW;
|
||||
c.height = svgCanvas.contentH;
|
||||
svgEditor.buildCanvgCallback(function () {
|
||||
canvg(c, data.svg, {renderCallback: function() {
|
||||
var pre, filename, suffix,
|
||||
datauri = quality ? c.toDataURL(mimeType, quality) : c.toDataURL(mimeType),
|
||||
|
@ -101,8 +102,7 @@ svgEditor.addExtension("server_opensave", {
|
|||
.appendTo('body')
|
||||
.submit().remove();
|
||||
}});
|
||||
|
||||
|
||||
})();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue