mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 23:44:54 +01:00
fixing text editor bug when dragging nodes
This commit is contained in:
parent
a0010e7cc7
commit
dc2d074fa5
@ -58,7 +58,7 @@ mindplot.DragManager.prototype.add = function(node)
|
|||||||
window.document.body.style.cursor = 'move';
|
window.document.body.style.cursor = 'move';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
dragManager._mouseMoveListener = mouseDownListener;
|
dragManager._mouseDownListener = mouseDownListener;
|
||||||
|
|
||||||
node.addEventListener('mousedown', mouseDownListener);
|
node.addEventListener('mousedown', mouseDownListener);
|
||||||
};
|
};
|
||||||
|
@ -68,8 +68,9 @@ mindplot.TextEditor = function(screenManager,actionRunner)
|
|||||||
};
|
};
|
||||||
//Register onLostFocus/onBlur event
|
//Register onLostFocus/onBlur event
|
||||||
$(this.inputText).addEvent('blur', this.lostFocusEvent.bind(this));
|
$(this.inputText).addEvent('blur', this.lostFocusEvent.bind(this));
|
||||||
$(this.inputText).addEvent('click', this.clickEvent.bindWithEvent(this));
|
$(this._myOverlay).addEvent('click', this.clickEvent.bindWithEvent(this));
|
||||||
$(this.inputText).addEvent('dblclick', this.clickEvent.bindWithEvent(this));
|
$(this._myOverlay).addEvent('dblclick', this.clickEvent.bindWithEvent(this));
|
||||||
|
$(this._myOverlay).addEvent('mousedown', this.mouseDownEvent.bindWithEvent(this));
|
||||||
|
|
||||||
var elem = this;
|
var elem = this;
|
||||||
var onComplete = function() {
|
var onComplete = function() {
|
||||||
@ -99,7 +100,6 @@ mindplot.TextEditor.prototype.lostFocusEvent = function ()
|
|||||||
{
|
{
|
||||||
this.fx.options.duration = 10;
|
this.fx.options.duration = 10;
|
||||||
this.fx.start(1, 0);
|
this.fx.start(1, 0);
|
||||||
designer.getWorkSpace().enableWorkspaceEvents(true);
|
|
||||||
//myAnim.animate();
|
//myAnim.animate();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -326,7 +326,6 @@ mindplot.TextEditor.prototype.setPosition = function (x, y, scale)
|
|||||||
|
|
||||||
mindplot.TextEditor.prototype.showTextEditor = function(selectText)
|
mindplot.TextEditor.prototype.showTextEditor = function(selectText)
|
||||||
{
|
{
|
||||||
designer.getWorkSpace().enableWorkspaceEvents(false);
|
|
||||||
//this._myOverlay.show();
|
//this._myOverlay.show();
|
||||||
//var myAnim = new YAHOO.util.Anim('inputText',{opacity: {to:1}}, 0.10, YAHOO.util.Easing.easeOut);
|
//var myAnim = new YAHOO.util.Anim('inputText',{opacity: {to:1}}, 0.10, YAHOO.util.Easing.easeOut);
|
||||||
//$('inputText').style.opacity='1';
|
//$('inputText').style.opacity='1';
|
||||||
@ -398,7 +397,19 @@ mindplot.TextEditor.prototype.clickEvent = function(event){
|
|||||||
{
|
{
|
||||||
event.cancelBubble = true;
|
event.cancelBubble = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
mindplot.TextEditor.prototype.mouseDownEvent = function(event){
|
||||||
|
if(this._isVisible()){
|
||||||
|
if (event.stopPropagation)
|
||||||
|
{
|
||||||
|
event.stopPropagation(true);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
event.cancelBubble = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user