mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-04-07 16:26:17 +00:00
Added printed version of graph image.
This commit is contained in:
@@ -14,6 +14,17 @@ function CommonEdgeStyle()
|
||||
this.loopShiftAngel = Math.PI / 6;
|
||||
}
|
||||
|
||||
function CommonPrintEdgeStyle()
|
||||
{
|
||||
this.strokeStyle = '#000000';
|
||||
this.weightText = '#000000';
|
||||
this.fillStyle = '#FFFFFF';
|
||||
this.textPadding = 4;
|
||||
this.textStrockeWidth = 2;
|
||||
this.sizeOfLoop = 24;
|
||||
this.loopShiftAngel = Math.PI / 6;
|
||||
}
|
||||
|
||||
function SelectedEdgeStyle0()
|
||||
{
|
||||
CommonEdgeStyle.apply(this, arguments);
|
||||
@@ -24,17 +35,6 @@ function SelectedEdgeStyle0()
|
||||
}
|
||||
SelectedEdgeStyle0.prototype = Object.create(CommonEdgeStyle.prototype);
|
||||
|
||||
function ProgressEdgeStyle()
|
||||
{
|
||||
CommonEdgeStyle.apply(this, arguments);
|
||||
|
||||
var selectedStyle = new SelectedEdgeStyle0();
|
||||
this.strokeStyle = selectedStyle.fillStyle;
|
||||
this.weightText = '#000000';
|
||||
this.fillStyle = '#000000';
|
||||
}
|
||||
ProgressEdgeStyle.prototype = Object.create(CommonEdgeStyle.prototype);
|
||||
|
||||
function SelectedEdgeStyle1()
|
||||
{
|
||||
CommonEdgeStyle.apply(this, arguments);
|
||||
@@ -78,9 +78,20 @@ function SelectedEdgeStyle4()
|
||||
}
|
||||
SelectedEdgeStyle4.prototype = Object.create(CommonEdgeStyle.prototype);
|
||||
|
||||
var selectedEdgeStyles = [new SelectedEdgeStyle0(), new SelectedEdgeStyle1(),
|
||||
function SelectedEdgePrintStyle()
|
||||
{
|
||||
CommonEdgeStyle.apply(this, arguments);
|
||||
|
||||
this.strokeStyle = '#AAAAAA';
|
||||
this.weightText = '#000000';
|
||||
this.fillStyle = '#AAAAAA';
|
||||
}
|
||||
SelectedEdgeStyle0.prototype = Object.create(CommonEdgeStyle.prototype);
|
||||
|
||||
var DefaultSelectedEdgeStyles = [new SelectedEdgeStyle0(), new SelectedEdgeStyle1(),
|
||||
new SelectedEdgeStyle2(), new SelectedEdgeStyle3(), new SelectedEdgeStyle4()];
|
||||
|
||||
var DefaultPrintSelectedEdgeStyles = [new SelectedEdgePrintStyle()];
|
||||
|
||||
function BaseEdgeDrawer(context, drawObjects)
|
||||
{
|
||||
@@ -299,8 +310,6 @@ ProgressArcDrawer.prototype.Draw = function(baseEdge, arcStyle)
|
||||
{
|
||||
this.baseDrawer.Draw(baseEdge, arcStyle);
|
||||
|
||||
this.SetupStyle(baseEdge, new ProgressEdgeStyle());
|
||||
|
||||
this.context.lineWidth = 10;
|
||||
|
||||
var positions = baseEdge.GetEdgePositionsShift();
|
||||
|
||||
Reference in New Issue
Block a user