Some SVG-edit tweaks
Remove the XML prolog. Fix focus on save.
This commit is contained in:
parent
c3ed5b461b
commit
de3008d3e4
2 changed files with 6 additions and 3 deletions
|
@ -87,6 +87,7 @@ function setupSVGedit(path){
|
|||
} else {
|
||||
var editor = window.open(path, 'Spoons!');
|
||||
}
|
||||
editor.focus();
|
||||
});
|
||||
}
|
||||
var t = $('content');
|
||||
|
@ -131,6 +132,9 @@ function setupSVGedit(path){
|
|||
Event.observe(window, "message", function(event){
|
||||
if(event.origin !== my_loc) { return;}
|
||||
t.value = before + event.data + after;
|
||||
t.focus();
|
||||
SVGeditButton.disabled = true;
|
||||
SVGeditButton.value = 'Create SVG graphic';
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* svgcanvas.js
|
||||
*
|
||||
* Licensed under the Apache License, Version 2
|
||||
|
@ -5223,9 +5223,8 @@ function BatchCommand(text) {
|
|||
if(opts) $.extend(save_options, opts);
|
||||
save_options.apply = true;
|
||||
|
||||
var str = "<?xml version=\"1.0\" standalone=\"no\"?>\n";
|
||||
// no need for doctype, see http://jwatt.org/svg/authoring/#doctype-declaration
|
||||
str += svgCanvasToString();
|
||||
var str = svgCanvasToString();
|
||||
call("saved", str);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue