mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 22:27:55 +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 dragTopic pivot
|
||||
// - Nodes that are collapsed
|
||||
// - It's not part of the branch dragged itself
|
||||
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:
|
||||
|
@ -669,7 +669,6 @@ mindplot.Topic = new Class({
|
||||
|
||||
showNoteEditor:function () {
|
||||
|
||||
|
||||
var topicId = this.getId();
|
||||
var model = this.getModel();
|
||||
var editorModel = {
|
||||
@ -1198,8 +1197,22 @@ mindplot.Topic = new Class({
|
||||
result = result.concat(innerChilds);
|
||||
}
|
||||
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