mirror of
https://github.com/UnickSoft/graphonline.git
synced 2025-07-03 08:15:38 +00:00
Fix loading old graphs.
This commit is contained in:
parent
1b3d8d72bc
commit
320de9f399
@ -43,7 +43,18 @@ const WeightTextCenter = 0,
|
|||||||
if (this.hasOwnProperty('weightPosition'))
|
if (this.hasOwnProperty('weightPosition'))
|
||||||
baseStyle.weightPosition = this.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 ()
|
BaseEdgeStyle.prototype.Clear = function ()
|
||||||
|
@ -112,7 +112,19 @@ BaseVertexStyle.prototype.GetStyle = function (baseStyle, object)
|
|||||||
baseStyle.commonTextPosition = this.commonTextPosition;
|
baseStyle.commonTextPosition = this.commonTextPosition;
|
||||||
|
|
||||||
baseStyle.lineWidth = parseInt(baseStyle.lineWidth);
|
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 ()
|
BaseVertexStyle.prototype.Clear = function ()
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<script src="<?= Root('i/js/dev/jquery-ui.js')?>"></script>
|
<script src="<?= Root('i/js/dev/jquery-ui.js')?>"></script>
|
||||||
<script src="<?= Root('i/js/dev/jquery.feedback_me.js')?>"></script>
|
<script src="<?= Root('i/js/dev/jquery.feedback_me.js')?>"></script>
|
||||||
<script src="<?= Root("script/example.js?v=43")?>" ></script>
|
<script src="<?= Root("script/example.js?v=44")?>" ></script>
|
||||||
</head>
|
</head>
|
||||||
<!--
|
<!--
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user