Commit 8e16d4a9 authored by campaign's avatar campaign

添加换行机制

parent 76ad8d4a
......@@ -266,9 +266,7 @@ KityMinder.registerModule('TextEditModule', function() {
},
'layoutfinish':function(e){
if (e.node === receiver.minderNode && (this.getStatus() == 'textedit' || this.getStatus() == 'inputready') ) {//&& selectionReadyShow
receiver
.setBaseOffset()
.setContainerStyle();
receiver.setContainerStyle();
}
},
'selectionclear': function() {
......@@ -289,7 +287,7 @@ KityMinder.registerModule('TextEditModule', function() {
km.setStatus('normal');
receiver.clear();
},
'textedit.mousewheel': function() {
'inputready.mousewheel textedit.mousewheel': function() {
receiver.setContainerStyle();
}
......
......@@ -111,10 +111,6 @@ Minder.Receiver = kity.createClass('Receiver', {
getBaseOffset: function() {
return this.textGroup.getRenderBox('screen');
},
setBaseOffset: function(refer) {
this.baseOffset = this.textGroup.getRenderBox(refer || this.km.getRenderContainer());
return this;
},
setContainerStyle: function() {
var textGroupBox = this.getBaseOffset();
this.container.style.cssText = ';left:' + (browser.ipad ? '-' : '') +
......@@ -222,11 +218,6 @@ Minder.Receiver = kity.createClass('Receiver', {
this.selection.setHeight((this.minderNode.getData('font-size') || this.minderNode.getStyle('font-size')) * 1);
return this;
},
_getRelativeValue:function(offset){
this.getBaseOffset();
offset.x = offset.x - this.baseOffset.x;
offset.y = offset.y - this.baseOffset.y;
},
updateSelectionByMousePosition: function(offset,dir) {
var me = this;
......
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