- Move keyboard events as part of a separate class.

- TextEditor is now one instance peer node.
- Broken: f2 and start writting on typing.
This commit is contained in:
Paulo Veiga
2011-08-19 13:38:37 -03:00
parent 78f312ef0a
commit f3e024735d
22 changed files with 759 additions and 799 deletions

View File

@@ -21,15 +21,12 @@ mindplot.CentralTopic = new Class({
Extends:mindplot.Topic,
initialize: function(model) {
this.parent(model);
this.registerEvents();
},
registerEvents : function() {
// Prevent click on the topics being propagated ...
this.addEventListener('click', function(event) {
event.stopPropagation();
});
_registerEvents : function() {
this.parent();
// This disable the drag of the central topic. But solves the problem of deselecting the nodes when the screen is clicked.
this.addEventListener('mousedown', function(event) {
event.stopPropagation();
});