Commit e51f17ac authored by techird's avatar techird

Merge branch 'dev' of github.com:fex-team/kityminder into dev

parents d1cb7060 e0c85ec1
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="keywords" content="思维导图,脑图,minder,mind,kity">
<meta name="description" content="在线思维导图工具"
<meta name="description" content="在线思维导图工具">
<script src="../lib/jquery-2.1.0.min.js" charset="utf-8"></script>
<script src="../lib/ZeroClipboard.min.js" charset="utf-8"></script>
<script type="text/javascript">
......
......@@ -11,7 +11,7 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
value: [],
autowidthitem: [],
enabledRecord: false,
enabledSelected:false
enabledSelected: false
},
$combox = null,
comboboxWidget = null;
......@@ -70,9 +70,12 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
if ( typeof ( data ) == 'string' ) {
var url = 'data:text/plain; utf-8,' + encodeURIComponent( data );
if ( ie_ver() > 0 ) {
alert( '11111111' );
console.log( p.fileExtension );
if ( p.fileExtension === '.km' ) {
console.log( "KM" );
doSave( 'application/x-javascript', data, me.getMinderTitle() );
} else( p.fileExtension === '.svg' ) {
doSave( 'image/svg+xml', data, filename );
} else {
doSave( 'text/html', data, filename );
}
......@@ -81,7 +84,6 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
}
} else if ( data && data.then ) {
data.then( function ( url ) {
console.log( url );
if ( ie_ver() > 0 ) {
//doSave( 'application/base64', url.replace( 'image/octet-stream,', '' ), filename );
} else {
......
......@@ -2,6 +2,7 @@ KityMinder.registerProtocal( "png", function () {
function loadImage( url, callback ) {
var image = new Image();
image.onload = callback;
console.log( url );
image.src = url;
}
......@@ -27,7 +28,7 @@ KityMinder.registerProtocal( "png", function () {
ctx = canvas.getContext( '2d' ),
blob, DomURL, url, img, finishCallback;
bgUrl = bgUrl.replace( /"/g, '' );
renderContainer.translate( -renderBox.x, -renderBox.y );
svgXml = km.getPaper().container.innerHTML;
......@@ -73,7 +74,6 @@ KityMinder.registerProtocal( "png", function () {
var url = canvas.toDataURL( 'png' );
return url.replace( 'image/png', 'image/octet-stream' );
}
loadImage( url, function () {
var svgImage = this;
loadImage( bgUrl, function () {
......
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