mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +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...
|
// Create nodes on double click...
|
||||||
screenManager.addEventListener('click', function(event)
|
screenManager.addEventListener('click', function(event)
|
||||||
{
|
{
|
||||||
|
var t = mindmapDesigner.getEditor()._isVisible();
|
||||||
mindmapDesigner.getEditor().lostFocus();
|
mindmapDesigner.getEditor().lostFocus();
|
||||||
// @todo: Puaj hack...
|
// @todo: Puaj hack...
|
||||||
mindmapDesigner._cleanScreen();
|
mindmapDesigner._cleanScreen();
|
||||||
|
@ -68,6 +68,7 @@ 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));
|
||||||
|
|
||||||
|
|
||||||
var elem = this;
|
var elem = this;
|
||||||
@ -98,6 +99,7 @@ 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();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -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);
|
dragger.add(topic);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*// Register editor events ...
|
// Register editor events ...
|
||||||
if (!this._viewMode)
|
if (!this.getDesigner()._viewMode)
|
||||||
{
|
{
|
||||||
this._editor.listenEventOnNode(topic, 'dblclick', true);
|
this.getDesigner()._editor.listenEventOnNode(topic, 'dblclick', true);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
_createMainTopicBoard:function(node){
|
_createMainTopicBoard:function(node){
|
||||||
|
Loading…
Reference in New Issue
Block a user