Commit 94f1ad8f authored by techird's avatar techird

修复导出PNG图片时闪烁的问题

parent e221b6e4
...@@ -31,6 +31,9 @@ KityMinder.registerProtocal( "png", function () { ...@@ -31,6 +31,9 @@ KityMinder.registerProtocal( "png", function () {
renderContainer.translate( -renderBox.x, -renderBox.y ); renderContainer.translate( -renderBox.x, -renderBox.y );
svgXml = km.getPaper().container.innerHTML; svgXml = km.getPaper().container.innerHTML;
renderContainer.translate( renderBox.x, renderBox.y );
$svg = $( svgXml ); $svg = $( svgXml );
$svg.attr( { $svg.attr( {
width: renderBox.width, width: renderBox.width,
...@@ -78,7 +81,6 @@ KityMinder.registerProtocal( "png", function () { ...@@ -78,7 +81,6 @@ KityMinder.registerProtocal( "png", function () {
downloadUrl = generateDataUrl( canvas ); downloadUrl = generateDataUrl( canvas );
if ( finishCallback ) { if ( finishCallback ) {
finishCallback( downloadUrl ); finishCallback( downloadUrl );
renderContainer.translate( renderBox.x, renderBox.y );
} }
} ); } );
} ); } );
......
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