mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-08 01:56:42 +02:00
MC-1730 Updated gradient settings
This commit is contained in:
@@ -52,7 +52,7 @@ export const render = async (data4Layout: any, svg: any, element: any, positions
|
||||
|
||||
gradient
|
||||
.attr('id', 'gradient')
|
||||
.attr('gradientUnits', 'objectBoundingBox')
|
||||
.attr('gradientUnits', 'userSpaceOnUse')
|
||||
.attr('spreadMethod', 'pad');
|
||||
|
||||
gradient
|
||||
@@ -63,32 +63,32 @@ export const render = async (data4Layout: any, svg: any, element: any, positions
|
||||
|
||||
gradient
|
||||
.append('svg:stop')
|
||||
.attr('offset', '75%')
|
||||
.attr('offset', '10%')
|
||||
.attr('stop-color', gradientStop)
|
||||
.attr('stop-opacity', 1);
|
||||
|
||||
// gradient
|
||||
// .append('svg:stop')
|
||||
// .attr('offset', '20%')
|
||||
// .attr('stop-color', gradientStart)
|
||||
// .attr('stop-opacity', 1);
|
||||
gradient
|
||||
.append('svg:stop')
|
||||
.attr('offset', '30%')
|
||||
.attr('stop-color', gradientStart)
|
||||
.attr('stop-opacity', 1);
|
||||
|
||||
// gradient
|
||||
// .append('svg:stop')
|
||||
// .attr('offset', '30%')
|
||||
// .attr('stop-color', gradientStop)
|
||||
// .attr('stop-opacity', 1);
|
||||
// gradient
|
||||
// .append('svg:stop')
|
||||
// .attr('offset', '40%')
|
||||
// .attr('stop-color', gradientStart)
|
||||
// .attr('stop-opacity', 1);
|
||||
gradient
|
||||
.append('svg:stop')
|
||||
.attr('offset', '35%')
|
||||
.attr('stop-color', gradientStop)
|
||||
.attr('stop-opacity', 1);
|
||||
gradient
|
||||
.append('svg:stop')
|
||||
.attr('offset', '60%')
|
||||
.attr('stop-color', gradientStart)
|
||||
.attr('stop-opacity', 1);
|
||||
|
||||
// gradient
|
||||
// .append('svg:stop')
|
||||
// .attr('offset', '50%')
|
||||
// .attr('stop-color', gradientStop)
|
||||
// .attr('stop-opacity', 1);
|
||||
gradient
|
||||
.append('svg:stop')
|
||||
.attr('offset', '80%')
|
||||
.attr('stop-color', gradientStop)
|
||||
.attr('stop-opacity', 1);
|
||||
}
|
||||
return layoutRenderer.render(data4Layout, svg, element, layoutDefinition.algorithm, positions);
|
||||
};
|
||||
|
@@ -93,7 +93,7 @@ class Theme {
|
||||
this.useGradient = true;
|
||||
this.gradientStart = this.primaryBorderColor;
|
||||
this.gradientStop = this.secondaryBorderColor;
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1)';
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1))';
|
||||
}
|
||||
updateColors() {
|
||||
this.secondBkg = lighten(this.mainBkg, 16);
|
||||
|
@@ -120,7 +120,7 @@ class Theme {
|
||||
this.useGradient = true;
|
||||
this.gradientStart = this.primaryBorderColor;
|
||||
this.gradientStop = this.secondaryBorderColor;
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1)';
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1))';
|
||||
this.updateColors();
|
||||
}
|
||||
updateColors() {
|
||||
|
@@ -96,7 +96,7 @@ class Theme {
|
||||
this.useGradient = true;
|
||||
this.gradientStart = this.primaryBorderColor;
|
||||
this.gradientStop = this.secondaryBorderColor;
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,0.5)';
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))';
|
||||
}
|
||||
updateColors() {
|
||||
/* Sequence Diagram variables */
|
||||
|
@@ -52,7 +52,7 @@ class Theme {
|
||||
this.useGradient = true;
|
||||
this.gradientStart = '#eb0042';
|
||||
this.gradientStop = '#0042eb';
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,0.5)';
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))';
|
||||
}
|
||||
updateColors() {
|
||||
// The || is to make sure that if the variable has been defined by a user override that value is to be used
|
||||
|
@@ -33,7 +33,7 @@ class Theme {
|
||||
this.useGradient = true;
|
||||
this.gradientStart = '#eb0042';
|
||||
this.gradientStop = '#0042eb';
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1)';
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1))';
|
||||
this.tertiaryColor = '#ffffff';
|
||||
}
|
||||
updateColors() {
|
||||
|
@@ -107,7 +107,7 @@ class Theme {
|
||||
this.useGradient = true;
|
||||
this.gradientStart = this.primaryBorderColor;
|
||||
this.gradientStop = this.secondaryBorderColor;
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1)';
|
||||
this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1))';
|
||||
}
|
||||
updateColors() {
|
||||
this.secondBkg = lighten(this.contrast, 55);
|
||||
|
Reference in New Issue
Block a user