Commit 8e876570 authored by Akikonata's avatar Akikonata

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

parents 4a24abd3 72fcba5d
......@@ -6,6 +6,7 @@
2. 添加超链接
3. 优化了当输入中文时,中文显示位置与光标距离过远的问题
4. 选中节点时,按F2直接进入文字编辑状态
5. 添加选中节点后可直接输入文字
###问题修复
1. 修复当滚动鼠标滚轮时,光标不跟着移动的问题
......
......@@ -28,19 +28,25 @@ KM.registerUI( 'contextmenu', function () {
});
me.$container.append($menu);
me.on('contextmenu',function(e){
if(this.getSelectedNodes().length == 0){
var node = e.getTargetNode();
if(node){
this.select(node);
}
}
var items = me.getContextmenu();
var data = [];
utils.each(items,function(i,item){
if(item.divider){
data.push(item)
data.length && data.push(item);
return;
}
if(me.queryCommandState(item.cmdName)!=-1){
data.push({
label:item.label,
value:item.cmdName
})
}
});
......@@ -52,10 +58,8 @@ KM.registerUI( 'contextmenu', function () {
$menu.kmui().setData({
data:data
}).position(e.getPosition()).show();
e.preventDefault()
}
e.preventDefault()
});
me.on('click',function(){
......
......@@ -50,6 +50,8 @@ var keymap = KityMinder.keymap = {
'n' : 78,
'notContentInput':{
8:1,
46:1,
13:1,
9:1,
33:1,
......
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