diff --git a/script/BaseEdgeDrawer.js b/script/BaseEdgeDrawer.js index ddeabff..c141b4d 100644 --- a/script/BaseEdgeDrawer.js +++ b/script/BaseEdgeDrawer.js @@ -43,8 +43,19 @@ const WeightTextCenter = 0, if (this.hasOwnProperty('weightPosition')) baseStyle.weightPosition = this.weightPosition; - return baseStyle; - } + return this.FixNewFields(baseStyle); +} + +BaseEdgeStyle.prototype.FixNewFields = function (style) +{ + if (!style.hasOwnProperty('lineDash')) + style.lineDash = 0; + + if (!style.hasOwnProperty('weightPosition')) + style.weightPosition = WeightTextCenter; + + return style; +} BaseEdgeStyle.prototype.Clear = function () { diff --git a/script/BaseVertexDrawer.js b/script/BaseVertexDrawer.js index 6c0a888..c049294 100644 --- a/script/BaseVertexDrawer.js +++ b/script/BaseVertexDrawer.js @@ -112,7 +112,19 @@ BaseVertexStyle.prototype.GetStyle = function (baseStyle, object) baseStyle.commonTextPosition = this.commonTextPosition; baseStyle.lineWidth = parseInt(baseStyle.lineWidth); - return baseStyle; + + return this.FixNewFields(baseStyle); +} + +BaseVertexStyle.prototype.FixNewFields = function (style) +{ + if (!style.hasOwnProperty('shape')) + style.shape = VertexCircleShape; + + if (!style.hasOwnProperty('commonTextPosition')) + style.commonTextPosition = CommonTextCenter; + + return style; } BaseVertexStyle.prototype.Clear = function () diff --git a/tpl/home.php b/tpl/home.php index 747d4ec..157b04e 100755 --- a/tpl/home.php +++ b/tpl/home.php @@ -10,7 +10,7 @@ - +