Commit 3cd04eb6 authored by techird's avatar techird

PNG 空格问题修复

parent b73ce19b
......@@ -31,8 +31,6 @@ KityMinder.registerProtocal( "png", function () {
renderContainer.translate( -renderBox.x, -renderBox.y );
svgXml = km.getPaper().container.innerHTML;
// svg 含有   符号导出报错 Entity 'nbsp' not defined
svgXml = svgXml.replace(/ /g, ' ').replace(/\s+/g, ' ');
renderContainer.translate( renderBox.x, renderBox.y );
......@@ -46,6 +44,9 @@ KityMinder.registerProtocal( "png", function () {
// need a xml with width and height
svgXml = $( '<div></div' ).append( $svg ).html();
// svg 含有 &nbsp; 符号导出报错 Entity 'nbsp' not defined
svgXml = svgXml.replace(/&nbsp;/g, '&#xa0;');
blob = new Blob( [ svgXml ], {
type: "image/svg+xml;charset=utf-8"
} );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment