Commit 159539c2 authored by techird's avatar techird

publish

parents dfbf06a4 908171a9
# KityMinder Change Log # KityMinder Change Log
## v1.2.0 ## v1.1.1
### 功能更新 ### 功能更新
1.添加快捷键,新建脑图(ctrl+n),分享脑图(ctrl+shift+s),保存脑图(ctrl+s)
1. 添加文件操作快捷键支持:
* 新建脑图(`Ctrl` + `N`
* 保存脑图到云端(`Ctrl` + `S`
* 分享脑图(`Ctrl` + `Shift` + `S`
2. 草稿功能升级为草稿箱
3. 添加了帮助菜单
## v1.1.0 ## v1.1.0
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
var KityMinder = window.KM = window.KityMinder = function () { var KityMinder = window.KM = window.KityMinder = function () {
var instanceMap = {}, instanceId = 0; var instanceMap = {}, instanceId = 0;
return { return {
version: '1.1.0', version: '1.1.1',
createMinder: function ( renderTarget, options ) { createMinder: function ( renderTarget, options ) {
options = options || {}; options = options || {};
options.renderTo = Utils.isString( renderTarget ) ? document.getElementById( renderTarget ) : renderTarget; options.renderTo = Utils.isString( renderTarget ) ? document.getElementById( renderTarget ) : renderTarget;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -338,6 +338,16 @@ $( function () { ...@@ -338,6 +338,16 @@ $( function () {
var data = minder.exportData( 'json' ); var data = minder.exportData( 'json' );
var sto = baidu.frontia.personalStorage; var sto = baidu.frontia.personalStorage;
function error( reason ) {
notice( reason + '\n建议您将脑图以 .km 格式导出到本地!' );
$save_btn.loading( false );
clearTimeout( timeout );
}
var timeout = setTimeout( function () {
error( '保存到云盘超时,可能是网络不稳定导致。' );
}, 15000 );
sto.uploadTextFile( data, remotePath || generateRemotePath(), { sto.uploadTextFile( data, remotePath || generateRemotePath(), {
ondup: remotePath ? sto.constant.ONDUP_OVERWRITE : sto.constant.ONDUP_NEWCOPY, ondup: remotePath ? sto.constant.ONDUP_OVERWRITE : sto.constant.ONDUP_NEWCOPY,
success: function ( savedFile ) { success: function ( savedFile ) {
...@@ -347,12 +357,14 @@ $( function () { ...@@ -347,12 +357,14 @@ $( function () {
} }
setRemotePath( savedFile.path, true ); setRemotePath( savedFile.path, true );
$save_btn.text( '已保存!' ); $save_btn.text( '已保存!' );
draftManager.save( remotePath );
clearTimeout( timeout );
} else {
error( '保存到云盘失败,可能是网络问题导致!' );
} }
draftManager.save( remotePath );
}, },
error: function ( error ) { error: function ( e ) {
window.alert( '保存到云盘失败,建议您将脑图以 .km 格式导出到本地!' ); error( '保存到云盘失败' );
$save_btn.loading( false );
} }
} ); } );
......
var KityMinder = window.KM = window.KityMinder = function () { var KityMinder = window.KM = window.KityMinder = function () {
var instanceMap = {}, instanceId = 0; var instanceMap = {}, instanceId = 0;
return { return {
version: '1.1.0', version: '1.1.1',
createMinder: function ( renderTarget, options ) { createMinder: function ( renderTarget, options ) {
options = options || {}; options = options || {};
options.renderTo = Utils.isString( renderTarget ) ? document.getElementById( renderTarget ) : renderTarget; options.renderTo = Utils.isString( renderTarget ) ? document.getElementById( renderTarget ) : renderTarget;
......
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