Fixed issue 266 by changing the viewBox to width/height on serialization

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@962 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-11-20 18:10:59 +00:00
parent 6d2729cf6b
commit 03d2a3e32b
1 changed files with 8 additions and 1 deletions

View File

@ -1084,8 +1084,15 @@ function BatchCommand(text) {
}
});
svgcontent.removeAttribute('id');
var res = canvas.getResolution();
assignAttributes(svgcontent, {width: res.w, height: res.h});
svgcontent.removeAttribute('viewBox');
var output = svgToString(svgcontent, 0);
svgcontent.id = 'svgcontent';
assignAttributes(svgcontent, {id: 'svgcontent', 'viewBox':[0,0,res.w,res.h].join(' ')});
svgcontent.removeAttribute('width');
svgcontent.removeAttribute('height');
return output;
}