when a topic was deleted, renderEdgeArrows was trying to call on a topic that was no longer existent to draw synapse direction, breaking the graph render
This commit is contained in:
parent
07e0aac7fd
commit
d2e9d87037
2 changed files with 10 additions and 5 deletions
|
@ -1758,7 +1758,9 @@ Metamaps.JIT = {
|
||||||
var posChild = adj.nodeTo.pos.getc(true);
|
var posChild = adj.nodeTo.pos.getc(true);
|
||||||
|
|
||||||
//plot arrow edge
|
//plot arrow edge
|
||||||
if (directionCat == "none") {
|
if (!direction) {
|
||||||
|
// render nothing for this arrow if the direction couldn't be retrieved
|
||||||
|
} else if (directionCat == "none") {
|
||||||
edgeHelper.line.render({
|
edgeHelper.line.render({
|
||||||
x: pos.x,
|
x: pos.x,
|
||||||
y: pos.y
|
y: pos.y
|
||||||
|
|
|
@ -356,10 +356,13 @@ Metamaps.Backbone.init = function () {
|
||||||
return Metamaps.Topics.get(this.get('node2_id'));
|
return Metamaps.Topics.get(this.get('node2_id'));
|
||||||
},
|
},
|
||||||
getDirection: function () {
|
getDirection: function () {
|
||||||
return [
|
var t1 = this.getTopic1(),
|
||||||
this.getTopic1().get('node').id,
|
t2 = this.getTopic2();
|
||||||
this.getTopic2().get('node').id
|
|
||||||
];
|
return t1 && t2 ? [
|
||||||
|
t1.get('node').id,
|
||||||
|
t2.get('node').id
|
||||||
|
] : false;
|
||||||
},
|
},
|
||||||
getMapping: function () {
|
getMapping: function () {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue