mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-29 17:04:59 +01:00
First editor integration.
This commit is contained in:
parent
d7817a6f2c
commit
8cf9e6d18e
@ -413,7 +413,6 @@ mindplot.Designer = new Class({
|
|||||||
this._nodeModelToNodeGraph(child, false);
|
this._nodeModelToNodeGraph(child, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return nodeGraph;
|
return nodeGraph;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -137,6 +137,18 @@ mindplot.DesignerModel = new Class({
|
|||||||
selectedTopic : function() {
|
selectedTopic : function() {
|
||||||
var topics = this.filterSelectedTopics();
|
var topics = this.filterSelectedTopics();
|
||||||
return (topics.length > 0) ? topics[0] : null;
|
return (topics.length > 0) ? topics[0] : null;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
findTopicById: function(id) {
|
||||||
|
var result = null;
|
||||||
|
for (var i = 0; i < this._topics.length; i++) {
|
||||||
|
var topic = this._topics[i];
|
||||||
|
if(topic.getId()==id){
|
||||||
|
result = topic;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
@ -230,6 +230,7 @@ mindplot.StandaloneActionDispatcher = new Class({
|
|||||||
|
|
||||||
execute:function(command) {
|
execute:function(command) {
|
||||||
this._actionRunner.execute(command);
|
this._actionRunner.execute(command);
|
||||||
|
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -1187,6 +1187,7 @@ mindplot.Topic = new Class({
|
|||||||
workspace.removeChild(line);
|
workspace.removeChild(line);
|
||||||
}
|
}
|
||||||
this._isInWorkspace = false;
|
this._isInWorkspace = false;
|
||||||
|
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.NodeRemoved, this.getModel());
|
||||||
},
|
},
|
||||||
|
|
||||||
addToWorkspace : function(workspace) {
|
addToWorkspace : function(workspace) {
|
||||||
|
@ -23,6 +23,12 @@ mindplot.nlayout.EventBusDispatcher = new Class({
|
|||||||
|
|
||||||
var size = {width:25,height:25};
|
var size = {width:25,height:25};
|
||||||
this._layoutManager = new mindplot.nlayout.LayoutManager(0, size);
|
this._layoutManager = new mindplot.nlayout.LayoutManager(0, size);
|
||||||
|
|
||||||
|
this._layoutManager.addEvent('change', function(event) {
|
||||||
|
var id = event.getId();
|
||||||
|
var topic = designerModel.findTopicById(id);
|
||||||
|
console.log("Modifing position to:" + id);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
registerBusEvents:function () {
|
registerBusEvents:function () {
|
||||||
@ -72,7 +78,7 @@ mindplot.nlayout.EventBusDispatcher = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_nodeRemoved: function(node) {
|
_nodeRemoved: function(node) {
|
||||||
console.log("mindplot.nlayout.EventBusDispatcher._nodeRemoved: Not Implemented yet");
|
this._layoutManager.removeNode(node.getId());
|
||||||
},
|
},
|
||||||
|
|
||||||
_doLayout: function() {
|
_doLayout: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user