mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-22 19:33:48 +01:00
fixing text edition problems
This commit is contained in:
parent
9a0de7ed21
commit
f8fa8b2b37
@ -91,6 +91,7 @@ mindplot.MindmapDesigner.prototype._registerEvents = function()
|
||||
// Create nodes on double click...
|
||||
screenManager.addEventListener('click', function(event)
|
||||
{
|
||||
var t = mindmapDesigner.getEditor()._isVisible();
|
||||
mindmapDesigner.getEditor().lostFocus();
|
||||
// @todo: Puaj hack...
|
||||
mindmapDesigner._cleanScreen();
|
||||
|
@ -68,6 +68,7 @@ mindplot.TextEditor = function(screenManager,actionRunner)
|
||||
};
|
||||
//Register onLostFocus/onBlur event
|
||||
$(this.inputText).addEvent('blur', this.lostFocusEvent.bind(this));
|
||||
$(this.inputText).addEvent('click', this.clickEvent.bindWithEvent(this));
|
||||
|
||||
|
||||
var elem = this;
|
||||
@ -98,6 +99,7 @@ mindplot.TextEditor.prototype.lostFocusEvent = function ()
|
||||
{
|
||||
this.fx.options.duration = 10;
|
||||
this.fx.start(1, 0);
|
||||
designer.getWorkSpace().enableWorkspaceEvents(true);
|
||||
//myAnim.animate();
|
||||
};
|
||||
|
||||
@ -386,3 +388,17 @@ mindplot.TextEditor.prototype.lostFocus = function(bothBrowsers)
|
||||
}
|
||||
};
|
||||
|
||||
mindplot.TextEditor.prototype.clickEvent = function(event){
|
||||
designer.getWorkSpace().enableWorkspaceEvents(false);
|
||||
if(this._isVisible()){
|
||||
if (event.stopPropagation)
|
||||
{
|
||||
event.stopPropagation(true);
|
||||
} else
|
||||
{
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
}
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
|
@ -94,11 +94,11 @@ mindplot.layoutManagers.OriginalLayoutManager = mindplot.layoutManagers.BaseLayo
|
||||
dragger.add(topic);
|
||||
}
|
||||
|
||||
/*// Register editor events ...
|
||||
if (!this._viewMode)
|
||||
// Register editor events ...
|
||||
if (!this.getDesigner()._viewMode)
|
||||
{
|
||||
this._editor.listenEventOnNode(topic, 'dblclick', true);
|
||||
}*/
|
||||
this.getDesigner()._editor.listenEventOnNode(topic, 'dblclick', true);
|
||||
}
|
||||
|
||||
},
|
||||
_createMainTopicBoard:function(node){
|
||||
|
Loading…
Reference in New Issue
Block a user