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-75d572ba1dddmaster
parent
6d2729cf6b
commit
03d2a3e32b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue