mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
- Fix problem selecting central node.
This commit is contained in:
parent
4e0becef47
commit
78f312ef0a
@ -21,6 +21,18 @@ mindplot.CentralTopic = new Class({
|
|||||||
Extends:mindplot.Topic,
|
Extends:mindplot.Topic,
|
||||||
initialize: function(model) {
|
initialize: function(model) {
|
||||||
this.parent(model);
|
this.parent(model);
|
||||||
|
this.registerEvents();
|
||||||
|
},
|
||||||
|
|
||||||
|
registerEvents : function() {
|
||||||
|
// Prevent click on the topics being propagated ...
|
||||||
|
this.addEventListener('click', function(event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.addEventListener('mousedown', function(event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
workoutIncomingConnectionPoint : function(sourcePosition) {
|
workoutIncomingConnectionPoint : function(sourcePosition) {
|
||||||
|
@ -38,7 +38,7 @@ mindplot.NodeGraph = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
get2DElement : function() {
|
get2DElement : function() {
|
||||||
$assert(this._elem2d, 'NodeGraph has not been initialized propertly');
|
$assert(this._elem2d, 'NodeGraph has not been initialized properly');
|
||||||
return this._elem2d;
|
return this._elem2d;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -54,10 +54,6 @@ mindplot.NodeGraph = new Class({
|
|||||||
elem.addEventListener(type, listener);
|
elem.addEventListener(type, listener);
|
||||||
},
|
},
|
||||||
|
|
||||||
isNodeGraph : function() {
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
setMouseEventsEnabled : function(isEnabled) {
|
setMouseEventsEnabled : function(isEnabled) {
|
||||||
this._mouseEvents = isEnabled;
|
this._mouseEvents = isEnabled;
|
||||||
},
|
},
|
||||||
|
@ -35,6 +35,16 @@ mindplot.Topic = new Class({
|
|||||||
if (pos != null && model.getType() == mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
|
if (pos != null && model.getType() == mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
|
||||||
this.setPosition(pos);
|
this.setPosition(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.registerEvents();
|
||||||
|
},
|
||||||
|
|
||||||
|
registerEvents:function () {
|
||||||
|
|
||||||
|
// Prevent click on the topics being propagated ...
|
||||||
|
this.addEventListener('click', function(event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
setShapeType : function(type) {
|
setShapeType : function(type) {
|
||||||
|
@ -126,9 +126,6 @@ mindplot.layout.OriginalLayoutManager = new Class({
|
|||||||
var designer = this.getDesigner();
|
var designer = this.getDesigner();
|
||||||
topic.addEventListener('click', function(event) {
|
topic.addEventListener('click', function(event) {
|
||||||
designer.onObjectFocusEvent(topic, event);
|
designer.onObjectFocusEvent(topic, event);
|
||||||
|
|
||||||
// Prevent click on the topics being propagated ...
|
|
||||||
event.stopPropagation();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add drag behaviour ...
|
// Add drag behaviour ...
|
||||||
|
Loading…
Reference in New Issue
Block a user