Commit 2fa73245 authored by Lingnan Wu's avatar Lingnan Wu

solved the imageEditor bug , the firefox dosen't recognise the syntax we used...

solved the imageEditor bug , the firefox dosen't recognise the syntax we used before after refresh the iframe
parent fa5f19e4
...@@ -10,21 +10,21 @@ ...@@ -10,21 +10,21 @@
* loadContentFromDocument : display the content of the specified document in the editor * loadContentFromDocument : display the content of the specified document in the editor
*/ */
SVGEditor = function() { SVGEditor = function() {
this.name = "svg-edit"; // name to use in dialog boxes this.name = "svg-edit"; // name to use in dialog boxes
this.objectName = "SVGEditor" ; // name of the object reference this.objectName = "SVGEditor" ; // name of the object reference
this.load = function() {$("#svgframe").attr("src", "svg-edit/svg-editor.html");} this.load = function() {
$("#svgframe").attr("src", "svg-edit/svg-editor.html");
}
this.saveEdition = function() { this.saveEdition = function() {
var s = "svgframe"; getCurrentDocument().saveEdition(document.getElementById("svgframe").contentWindow.svgCanvas.getSvgString());
getCurrentDocument().saveEdition(window.frames[s].svgCanvas.getSvgString());
} }
this.loadContentFromDocument = function(doc) { this.loadContentFromDocument = function(doc) {
tryUntilSucceed(function() {window.frames["svgframe"].svgEditor.loadFromString(doc.getContent());}); tryUntilSucceed(function() {document.getElementById("svgframe").contentWindow.svgEditor.loadFromString(doc.getContent());});
} }
this.load(); this.load();
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment