mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-09 00:43:23 +01:00
-Fix Uncaught RangeError: Maximum call stack size exceeded, line:114
This commit is contained in:
parent
04a221799a
commit
ca37d3f384
@ -57,8 +57,13 @@ mindplot.DragConnector = new Class({
|
|||||||
// - Exclude dragged topic
|
// - Exclude dragged topic
|
||||||
// - Exclude dragTopic pivot
|
// - Exclude dragTopic pivot
|
||||||
// - Nodes that are collapsed
|
// - Nodes that are collapsed
|
||||||
|
// - It's not part of the branch dragged itself
|
||||||
topics = topics.filter(function (topic) {
|
topics = topics.filter(function (topic) {
|
||||||
return draggedNode != topic && topic != draggedNode && !topic.areChildrenShrunken() && !topic.isCollapsed();
|
var result = draggedNode != topic;
|
||||||
|
result = result && topic != draggedNode;
|
||||||
|
result = result && !topic.areChildrenShrunken() && !topic.isCollapsed();
|
||||||
|
result = result && !draggedNode.isChildTopic(topic);
|
||||||
|
return result;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Filter all the nodes that are outside the vertical boundary:
|
// Filter all the nodes that are outside the vertical boundary:
|
||||||
|
@ -669,7 +669,6 @@ mindplot.Topic = new Class({
|
|||||||
|
|
||||||
showNoteEditor:function () {
|
showNoteEditor:function () {
|
||||||
|
|
||||||
|
|
||||||
var topicId = this.getId();
|
var topicId = this.getId();
|
||||||
var model = this.getModel();
|
var model = this.getModel();
|
||||||
var editorModel = {
|
var editorModel = {
|
||||||
@ -1198,8 +1197,22 @@ mindplot.Topic = new Class({
|
|||||||
result = result.concat(innerChilds);
|
result = result.concat(innerChilds);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
isChildTopic:function (childTopic) {
|
||||||
|
var result = (this.getId() == childTopic.getId());
|
||||||
|
if (!result) {
|
||||||
|
var children = this.getChildren();
|
||||||
|
for (var i = 0; i < children.length; i++) {
|
||||||
|
var parent = children[i];
|
||||||
|
result = parent.isChildTopic(childTopic);
|
||||||
|
if (result) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user