Commit 333bdd6a authored by techird's avatar techird

dist

parents a94e768a 3727100e
......@@ -7580,6 +7580,9 @@ KityMinder.registerProtocal( "png", function () {
renderContainer.translate( -renderBox.x, -renderBox.y );
svgXml = km.getPaper().container.innerHTML;
renderContainer.translate( renderBox.x, renderBox.y );
$svg = $( svgXml );
$svg.attr( {
width: renderBox.width,
......@@ -7627,7 +7630,6 @@ KityMinder.registerProtocal( "png", function () {
downloadUrl = generateDataUrl( canvas );
if ( finishCallback ) {
finishCallback( downloadUrl );
renderContainer.translate( renderBox.x, renderBox.y );
}
} );
} );
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Subproject commit 26f9836718affd92c95196be698b14b1c6da4a95
Subproject commit e144ccd9270712497804915d13ec92f6593299b0
......@@ -35,9 +35,9 @@ var ViewDragger = kity.createClass( "ViewDragger", {
dragger.setEnabled( true );
isRootDrag = true;
var me = this;
setTimeout(function() {
me.setStatus('hand');
}, 1);
setTimeout( function () {
me.setStatus( 'hand' );
}, 1 );
}
} );
......@@ -111,21 +111,36 @@ KityMinder.registerModule( 'Hand', function () {
}
},
mousewheel: function ( e ) {
var dx = e.originEvent.wheelDeltaX || 0,
dy = e.originEvent.wheelDeltaY || e.originEvent.wheelDelta;
var dx, dy;
e = e.originEvent;
if ( 'wheelDeltaX' in e ) {
dx = e.wheelDeltaX || 0;
dy = e.wheelDeltaY || 0;
} else {
dx = 0;
dy = e.wheelDelta;
}
this._viewDragger.move( {
x: dx / 2.5,
y: dy / 2.5
} );
e.originEvent.preventDefault();
e.preventDefault();
},
dblclick: function () {
dblclick: function ( e ) {
if ( e.getTargetNode() ) return;
var viewport = this.getPaper().getViewPort();
var offset = this.getRoot().getRenderContainer( this.getRenderContainer() ).getTransform().getTranslate();
var dx = viewport.center.x - offset.x,
var offset = this.getRoot().getRenderContainer().getRenderBox( this.getRenderContainer() );
var dx = viewport.center.x - offset.x - offset.width / 2,
dy = viewport.center.y - offset.y;
//this.getRenderContainer().fxTranslate(dx, dy, 300);
this.getRenderContainer().fxTranslate( dx, dy, 1000, "easeOutQuint" );
}
}
};
......
......@@ -31,6 +31,9 @@ KityMinder.registerProtocal( "png", function () {
renderContainer.translate( -renderBox.x, -renderBox.y );
svgXml = km.getPaper().container.innerHTML;
renderContainer.translate( renderBox.x, renderBox.y );
$svg = $( svgXml );
$svg.attr( {
width: renderBox.width,
......@@ -78,7 +81,6 @@ KityMinder.registerProtocal( "png", function () {
downloadUrl = generateDataUrl( canvas );
if ( finishCallback ) {
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