strathausen / dracula

JavaScript layout and representation of connected graphs.
https://www.graphdracula.net
MIT License
836 stars 132 forks source link

validates connection present for edge #24

Closed Bor1s closed 8 years ago

Bor1s commented 10 years ago

Sometimes connection is undefined at show/hide Edge functions which creates a crash for 'fg' in next code:

AbstractEdge.prototype = {
    hide: function() {
      this.connection.fg.hide();
      this.connection.bg && this.bg.connection.hide();
    }
};

So I believe it is good idea to check for:

this.connection
strathausen commented 8 years ago

Hey, I've rearranged the code quite a lot recently. I'll provide some way to incorporate your proposal (it's quite up on my list)