Commit b940c775 authored by campaign's avatar campaign

更新选区

parent e157fb6a
......@@ -4,16 +4,14 @@
###功能更新
1. 添加保存时可修改文件名
2. 添加超链接功能
3. 优化了当输入中文时,中文显示位置与光标距离过远的问题
4. 选中节点时,按F2直接进入文字编辑状态
5. 添加选中节点后可直接输入文字
6. 添加全部展开和部分展开功能
3. 选中节点时,按F2直接进入文字编辑状态
###问题修复
1. 修复当滚动鼠标滚轮时,光标不跟着移动的问题
2. 优化了拖拽节点操作体验
3. 优化了大文件加载体验
4. 修复回退操作后所选节点未回选问题
3. 修复回退操作后所选节点未回选问题
4. 添加选中节点后可直接输入文字
5. 优化了当输入中文时,中文显示位置与光标距离过远的问题
## v1.1.2
......
......@@ -24,7 +24,6 @@
$w.kmui().hide();
});
var url = km.queryCommandValue('hyperlink');
var $input = $w.find('#hyperlink_href');
$input.val(url || 'http://');
setTimeout(function(){
......
......@@ -20,7 +20,7 @@ KityMinder.registerModule( "TextEditModule", function () {
var selectionByClick = false;
var dragmoveTimer;
return {
"events": {
//插入光标
......@@ -62,7 +62,7 @@ KityMinder.registerModule( "TextEditModule", function () {
.setBaseOffset()
.setContainerStyle()
.setSelectionHeight()
.setCurrentIndex(e.getPosition())
.setCurrentIndex(e.getPosition(this.getRenderContainer()))
.updateSelection()
.setRange(range);
sel.setData('relatedNode',node);
......@@ -73,6 +73,7 @@ KityMinder.registerModule( "TextEditModule", function () {
selectionByClick = false;
}
km.setStatus('textedit')
lastMousedownTimer = +new Date;
}
}
},
......@@ -125,6 +126,7 @@ KityMinder.registerModule( "TextEditModule", function () {
if(mouseDownStatus){
if(!sel.collapsed ){
try{
receiver.updateRange(range)
}catch(e){
......@@ -171,10 +173,8 @@ KityMinder.registerModule( "TextEditModule", function () {
if(mouseDownStatus){
e.stopPropagationImmediately();
var offset = e.getPosition();
if(Math.abs(offset.y - lastEvtPosition.y) >= 1 && Math.abs(lastEvtPosition.x - offset.x) <= 1 ){
var offset = e.getPosition(this.getRenderContainer());
if(Math.abs(offset.y - lastEvtPosition.y) >= 2 && Math.abs(lastEvtPosition.x - offset.x) <= 2 ){
sel.setHide();
mouseDownStatus = false;
return;
......
......@@ -349,7 +349,7 @@ Minder.Receiver = kity.createClass( 'Receiver', {
endOffset = this.textData[ this.selection.endOffset ],
width = 0;
if ( this.selection.collapsed ) {
this.selection.updateShow( startOffset || this.textData[ this.textData.length - 1 ], 0 );
this.selection.updateShow( startOffset || this.textData[ this.textData.length - 1 ],1 );
return this;
}
if ( !endOffset ) {
......
......@@ -99,7 +99,9 @@ Minder.Selection = kity.createClass( 'Selection', {
var me = this,
state = '';
me.setStyle( 'display', '' );
if(this.collapsed){
me.setOpacity(1);
this.timer = setInterval( function () {
me.setStyle( 'display', state );
state = state ? '' : 'none';
......
......@@ -29,10 +29,8 @@ KityMinder.registerModule( "hyperlink", function () {
return result;
},
queryValue: function ( km ) {
if ( km.queryCommandState( 'hyperlink' ) == 1 ) {
var node = km.getSelectedNode();
return node.getData( 'hyperlink' );
}
var node = km.getSelectedNode();
return node.getData( 'hyperlink' );
}
} ),
"unhyperlink": kity.createClass( "hyperlink", {
......
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