Commit 70549100 authored by Akikonata's avatar Akikonata

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

parents 47885a01 f4b2d225
......@@ -5,13 +5,16 @@
1. 添加保存时可修改文件名
2. 添加超链接功能
3. 选中节点时,按F2直接进入文字编辑状态
4. 展开所有收起节点
###问题修复
1. 修复当滚动鼠标滚轮时,光标不跟着移动的问题
2. 优化了拖拽节点操作体验
3. 修复回退操作后所选节点未回选问题
4. 添加选中节点后可直接输入文字
5. 优化了当输入中文时,中文显示位置与光标距离过远的问题
4. 修复回退操作后展开收起的节点没有记录问题
5. ** 选中节点后可直接输入文字**
6. 优化了输入文字时的卡顿效果
7. 优化了当输入中文时,中文显示位置与光标距离过远的问题
## v1.1.2
......
......@@ -66,7 +66,6 @@
,'adapter/button.js'
,'adapter/combobox.js'
,'adapter/saveto.js'
,'adapter/view.js'
,'adapter/tooltips.js'
,'adapter/layout.js'
,'adapter/node.js'
......
......@@ -63,7 +63,7 @@
'KITYMINDER_HOME_URL': getKMBasePath(),
//定义工具栏
toolbars: [
'hand zoom-in zoom-out expand contract | undo redo | bold italic | fontfamily fontsize forecolor | saveto | hyperlink unhyperlink | markers | node | preference | help'
'hand zoom-in zoom-out collapsenode expandnode | undo redo | bold italic | fontfamily fontsize forecolor | saveto | hyperlink unhyperlink | markers | node | help'
]
//只读模式,默认是false
//readOnly: true
......
......@@ -20,7 +20,9 @@ KityMinder.LANG[ 'zh-cn' ] = {
'help': '帮助',
'preference': '偏好设置',
'hyperlink':'插入链接',
'unhyperlink':"删除链接"
'unhyperlink':"删除链接",
'expandnode':"展开所有节点",
'collapsenode':"闭合所有节点"
},
'popupcolor': {
'clearColor': '清空颜色',
......
KM.registerToolbarUI( 'bold italic redo undo unhyperlink',
KM.registerToolbarUI( 'bold italic redo undo unhyperlink expandnode collapsenode hand zoom-in zoom-out',
function ( name ) {
var me = this;
var $btn = $.kmuibutton( {
......
KM.registerUI( 'preference',
function ( name ) {
var km = this;
//读取偏好设置,设置参数
}
);
\ No newline at end of file
KM.registerToolbarUI( 'hand zoom-in zoom-out expand contract',
function ( name ) {
var me = this;
var $btn = $.kmuibutton( {
icon: name,
click: function () {
console.log( name );
me.execCommand( name );
},
title: this.getLang( 'tooltips.' )[ name ] || ''
} );
me.on( 'interactchange', function () {
var state = me.queryCommandState( name );
$btn.kmui().disabled( state == -1 ).active( state == 1 );
} );
return $btn;
}
);
\ No newline at end of file
......@@ -11,6 +11,8 @@ KityMinder.registerModule( "Expand", function () {
_buffer.shift();
}
}
// var setOptionValue = function ( root, layer, sub ) {
// var cur_layer = 1;
// var _buffer = root.getChildren();
......@@ -120,7 +122,7 @@ KityMinder.registerModule( "Expand", function () {
return this.getData( EXPAND_STATE_DATA ) === STATE_EXPAND;
}
} );
var ExpandAllNodeCommand = kity.createClass( "ExpandAllNodeCommand", ( function () {
var ExpandNodeCommand = kity.createClass( "ExpandNodeCommand", ( function () {
return {
base: Command,
execute: function ( km ) {
......@@ -128,16 +130,18 @@ KityMinder.registerModule( "Expand", function () {
n.expand();
} );
km.initStyle();
},
queryState: function ( km ) {
return 0;
}
};
} )() );
var CollapseAllNodeCommand = kity.createClass( "ExpandAllNodeCommand", ( function () {
var CollapseNodeCommand = kity.createClass( "CollapseNodeCommand", ( function () {
return {
base: Command,
execute: function ( km ) {
layerTravel( km.getRoot(), function ( n ) {
n.collapse();
} );
......@@ -146,6 +150,7 @@ KityMinder.registerModule( "Expand", function () {
queryState: function ( km ) {
return 0;
}
};
} )() );
return {
......@@ -158,8 +163,9 @@ KityMinder.registerModule( "Expand", function () {
}
},
'commands': {
'expand': ExpandAllNodeCommand,
'contract': CollapseAllNodeCommand
'ExpandNode': ExpandNodeCommand,
'CollapseNode': CollapseNodeCommand
}
};
} );
\ No newline at end of file
......@@ -35,10 +35,10 @@
.kmui-btn-toolbar .kmui-btn .kmui-icon-preference {
background: url(../images/setting.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-expand {
.kmui-btn-toolbar .kmui-btn .kmui-icon-expandnode {
background: url(../images/expand.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-contract {
.kmui-btn-toolbar .kmui-btn .kmui-icon-collapsenode {
background: url(../images/contract.png) no-repeat 2px 2px;
}
......
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