Update svgcanvas.js

Changed docs and return value to match if unsuccessful
This commit is contained in:
Ian
2015-09-30 11:24:16 +01:00
parent ea129f009e
commit f1b67e4159

View File

@@ -4959,7 +4959,7 @@ this.setSvgString = function(xmlString) {
// xmlString - The SVG as XML text.
//
// Returns:
// This function returns false if the import was unsuccessful, true otherwise.
// This function returns null if the import was unsuccessful, or the element otherwise.
// TODO:
// * properly handle if namespace is introduced by imported content (must add to svgcontent
// and update all prefixes in the imported node)
@@ -5080,7 +5080,7 @@ this.importSvgString = function(xmlString) {
} catch(e) {
console.log(e);
return false;
return null;
}
// we want to return the element so we can automatically select it