mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-10-21 15:57:09 +00:00
Implement style switching functionality. Add default, night, and high contrast styles.
This commit is contained in:
1 parent
dee5d4c4ea
commit
6f5fb0fc9c
30 files changed
+661
-63
No files matched your search
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* New Contrast edge styles.
|
||||
*/
|
||||
|
||||
function ContrastCommonEdgeStyle()
|
||||
{
|
||||
BaseEdgeStyle.apply(this, arguments);
|
||||
|
||||
this.strokeStyle = '#000000';
|
||||
this.weightText = '#000000';
|
||||
this.fillStyle = '#ffffff';
|
||||
this.textPadding = 4;
|
||||
this.textStrokeWidth = 2;
|
||||
this.lineDash = 0;
|
||||
this.additionalTextColor = '#000000';
|
||||
this.weightPosition = WeightTextCenter;
|
||||
this.mainTextFontSize = 16;
|
||||
}
|
||||
|
||||
ContrastCommonEdgeStyle.prototype = Object.create(BaseEdgeStyle.prototype);
|
||||
|
||||
function ContrastSelectedEdgeStyle0()
|
||||
{
|
||||
BaseEdgeStyle.apply(this, arguments);
|
||||
|
||||
this.strokeStyle = '#000000';
|
||||
this.weightText = '#000000';
|
||||
this.fillStyle = '#ffffff';
|
||||
this.additionalTextColor = '#000000';
|
||||
this.lineDash = 1
|
||||
|
||||
this.baseStyles.push("common");
|
||||
}
|
||||
|
||||
ContrastSelectedEdgeStyle0.prototype = Object.create(BaseEdgeStyle.prototype);
|
||||
|
||||
function GetContrastCommonEdgeStyle()
|
||||
{
|
||||
return new ContrastCommonEdgeStyle();
|
||||
}
|
||||
|
||||
var ContrastSelectedEdgeStyles = [new ContrastSelectedEdgeStyle0(), new ContrastSelectedEdgeStyle0(),
|
||||
new ContrastSelectedEdgeStyle0(), new ContrastSelectedEdgeStyle0(), new ContrastSelectedEdgeStyle0()];
|
||||
Reference in new issue
Block a user