Commit 5408295a authored by Akikonata's avatar Akikonata

fixed xy

parent ecf79bcf
...@@ -32,10 +32,10 @@ KM.registerToolbarUI( 'saveto', function ( name ) { ...@@ -32,10 +32,10 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
comboboxWidget.on( 'comboboxselect', function ( evt, res ) { comboboxWidget.on( 'comboboxselect', function ( evt, res ) {
if ( res.value === "png" ) { if ( res.value === "png" ) {
var svghtml = $( "#kityminder .kmui-editor-body" ).html(); var svghtml = $( "#kityminder .kmui-editor-body" ).html();
console.log( me.getRenderContainer().getWidth(), me.getRenderContainer().getHeight() ); var rootBox = me.getRoot().getRenderContainer().getRenderBox();
var svg = $( svghtml ).attr( { var svg = $( svghtml ).attr( {
width: me.getRenderContainer().getWidth(), width: rootBox.x + me.getRenderContainer().getWidth() + 20,
height: me.getRenderContainer().getHeight() height: rootBox.y + me.getRenderContainer().getHeight() + 20
} ); } );
var div = $( "<div></div>" ).append( svg ); var div = $( "<div></div>" ).append( svg );
svghtml = div.html(); svghtml = div.html();
......
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