Commit 359e26b6 authored by techird's avatar techird

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

parents 6f2a9ca6 47e589f9
# KityMinder Change Log
## v1.2.0
### 功能更新
1.添加快捷键,新建脑图(ctrl+n),分享脑图(ctrl+shift+s),保存脑图(ctrl+s)
## v1.1.0
......
......@@ -50,9 +50,7 @@
}
this.root().html( html );
},
initEvent: function ( km, $w ) {
},
initEvent: function ( km, $w ) {},
width: 400
} );
} )();
\ No newline at end of file
......@@ -386,4 +386,31 @@ $( function () {
}
window.km.on( 'contentchange', checkAutoSave );
} );
\ No newline at end of file
//添加快捷键
$(document.body).keydown(function(e){
var keyCode = e.keyCode || e.which;
//添加快捷键
if((e.ctrlKey || e.metaKey)){
switch (keyCode){
//保存
case KM.keymap.s :
if(e.shiftKey){
shareThisFile()
}else{
saveThisFile();
}
e.preventDefault();
break;
case KM.keymap.n :
newFile();
e.preventDefault();
break;
}
}
})
} );
......@@ -40,5 +40,9 @@ var keymap = KityMinder.keymap = {
'y':89,
//粘贴
'v' : 86,
'x' : 88
'x' : 88,
's' : 83,
'n' : 78
};
\ No newline at end of file
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