From 063bfc91ec60d5f4168503854d118db06d761cbc Mon Sep 17 00:00:00 2001 From: Unick Soft Date: Sat, 6 May 2017 20:35:59 +0300 Subject: [PATCH] Added algorithm of visualization of graph based on weight and vertex degree. --- script/BaseEdge.js | 3 +- script/BaseEdgeDrawer.js | 22 ++--- script/BaseVertex.js | 2 +- script/plugins/ModernGraphStyle.js | 128 +++++++++++++++++++++++++++++ 4 files changed, 142 insertions(+), 13 deletions(-) create mode 100644 script/plugins/ModernGraphStyle.js diff --git a/script/BaseEdge.js b/script/BaseEdge.js index 66ca895..69352bd 100644 --- a/script/BaseEdge.js +++ b/script/BaseEdge.js @@ -14,10 +14,9 @@ function BaseEdge(vertex1, vertex2, isDirect, weight, useWeight) this.hasPair = false; this.useWeight = useWeight; this.id = 0; + this.model = new EdgeModel(); } -BaseEdge.prototype.model = new EdgeModel(); - BaseEdge.prototype.SaveToXML = function () { return "