mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-04-10 09:46:17 +00:00
Add new default style.
This commit is contained in:
37
script/features/draw_graph/model/PrintEdgeStyle.js
Normal file
37
script/features/draw_graph/model/PrintEdgeStyle.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Print Edge style.
|
||||
*/
|
||||
|
||||
function CommonPrintEdgeStyle()
|
||||
{
|
||||
BaseEdgeStyle.apply(this, arguments);
|
||||
|
||||
this.strokeStyle = '#000000';
|
||||
this.weightText = '#000000';
|
||||
this.fillStyle = '#FFFFFF';
|
||||
this.textPadding = 4;
|
||||
this.textStrokeWidth = 2;
|
||||
|
||||
this.baseStyles.push("common");
|
||||
}
|
||||
CommonPrintEdgeStyle.prototype = Object.create(BaseEdgeStyle.prototype);
|
||||
|
||||
function SelectedEdgePrintStyle()
|
||||
{
|
||||
BaseEdgeStyle.apply(this, arguments);
|
||||
|
||||
this.strokeStyle = '#AAAAAA';
|
||||
this.weightText = '#000000';
|
||||
this.fillStyle = '#AAAAAA';
|
||||
|
||||
this.baseStyles.push("printed");
|
||||
}
|
||||
SelectedEdgePrintStyle.prototype = Object.create(BaseEdgeStyle.prototype);
|
||||
|
||||
|
||||
function DefaultCommonPrintEdgeStyle()
|
||||
{
|
||||
return new CommonPrintEdgeStyle();
|
||||
}
|
||||
|
||||
var DefaultPrintSelectedEdgeStyles = [new SelectedEdgePrintStyle()];
|
||||
Reference in New Issue
Block a user