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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user