Added proper support for child SVG elements and made image library import SVGs, taking care of more of issue 71. Also fixed Opera 10.60 layer bug

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1633 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2010-07-16 15:46:54 +00:00
parent f0ec659f19
commit eb575ef68d
3 changed files with 299 additions and 158 deletions

View File

@@ -18,7 +18,7 @@ svgEditor.addExtension("imagelib", function() {
name: 'Demo library (external)',
url: 'http://a.deveria.com/tests/clip-art/',
description: 'Demonstration library for SVG-edit on another domain'
},
}
];
@@ -39,11 +39,13 @@ svgEditor.addExtension("imagelib", function() {
switch (char1) {
case '<':
svgEditor.loadFromString(response);
svgCanvas.importSvgString(response);
break;
case 'd':
if(response.indexOf('data:') === 0) {
svgEditor.loadFromDataURI(response);
var pre = 'data:image/svg+xml;base64,';
var src = response.substring(pre.length);
svgCanvas.importSvgString(svgCanvas.Utils.decode64(src));
break;
}
// Else fall through