mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-12 11:59:39 +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
|
gradient
|
||||||
.attr('id', 'gradient')
|
.attr('id', 'gradient')
|
||||||
.attr('gradientUnits', 'objectBoundingBox')
|
.attr('gradientUnits', 'userSpaceOnUse')
|
||||||
.attr('spreadMethod', 'pad');
|
.attr('spreadMethod', 'pad');
|
||||||
|
|
||||||
gradient
|
gradient
|
||||||
@@ -63,32 +63,32 @@ export const render = async (data4Layout: any, svg: any, element: any, positions
|
|||||||
|
|
||||||
gradient
|
gradient
|
||||||
.append('svg:stop')
|
.append('svg:stop')
|
||||||
.attr('offset', '75%')
|
.attr('offset', '10%')
|
||||||
.attr('stop-color', gradientStop)
|
.attr('stop-color', gradientStop)
|
||||||
.attr('stop-opacity', 1);
|
.attr('stop-opacity', 1);
|
||||||
|
|
||||||
// gradient
|
gradient
|
||||||
// .append('svg:stop')
|
.append('svg:stop')
|
||||||
// .attr('offset', '20%')
|
.attr('offset', '30%')
|
||||||
// .attr('stop-color', gradientStart)
|
.attr('stop-color', gradientStart)
|
||||||
// .attr('stop-opacity', 1);
|
.attr('stop-opacity', 1);
|
||||||
|
|
||||||
// gradient
|
gradient
|
||||||
// .append('svg:stop')
|
.append('svg:stop')
|
||||||
// .attr('offset', '30%')
|
.attr('offset', '35%')
|
||||||
// .attr('stop-color', gradientStop)
|
.attr('stop-color', gradientStop)
|
||||||
// .attr('stop-opacity', 1);
|
.attr('stop-opacity', 1);
|
||||||
// gradient
|
gradient
|
||||||
// .append('svg:stop')
|
.append('svg:stop')
|
||||||
// .attr('offset', '40%')
|
.attr('offset', '60%')
|
||||||
// .attr('stop-color', gradientStart)
|
.attr('stop-color', gradientStart)
|
||||||
// .attr('stop-opacity', 1);
|
.attr('stop-opacity', 1);
|
||||||
|
|
||||||
// gradient
|
gradient
|
||||||
// .append('svg:stop')
|
.append('svg:stop')
|
||||||
// .attr('offset', '50%')
|
.attr('offset', '80%')
|
||||||
// .attr('stop-color', gradientStop)
|
.attr('stop-color', gradientStop)
|
||||||
// .attr('stop-opacity', 1);
|
.attr('stop-opacity', 1);
|
||||||
}
|
}
|
||||||
return layoutRenderer.render(data4Layout, svg, element, layoutDefinition.algorithm, positions);
|
return layoutRenderer.render(data4Layout, svg, element, layoutDefinition.algorithm, positions);
|
||||||
};
|
};
|
||||||
|
@@ -93,7 +93,7 @@ class Theme {
|
|||||||
this.useGradient = true;
|
this.useGradient = true;
|
||||||
this.gradientStart = this.primaryBorderColor;
|
this.gradientStart = this.primaryBorderColor;
|
||||||
this.gradientStop = this.secondaryBorderColor;
|
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() {
|
updateColors() {
|
||||||
this.secondBkg = lighten(this.mainBkg, 16);
|
this.secondBkg = lighten(this.mainBkg, 16);
|
||||||
|
@@ -120,7 +120,7 @@ class Theme {
|
|||||||
this.useGradient = true;
|
this.useGradient = true;
|
||||||
this.gradientStart = this.primaryBorderColor;
|
this.gradientStart = this.primaryBorderColor;
|
||||||
this.gradientStop = this.secondaryBorderColor;
|
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();
|
this.updateColors();
|
||||||
}
|
}
|
||||||
updateColors() {
|
updateColors() {
|
||||||
|
@@ -96,7 +96,7 @@ class Theme {
|
|||||||
this.useGradient = true;
|
this.useGradient = true;
|
||||||
this.gradientStart = this.primaryBorderColor;
|
this.gradientStart = this.primaryBorderColor;
|
||||||
this.gradientStop = this.secondaryBorderColor;
|
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() {
|
updateColors() {
|
||||||
/* Sequence Diagram variables */
|
/* Sequence Diagram variables */
|
||||||
|
@@ -52,7 +52,7 @@ class Theme {
|
|||||||
this.useGradient = true;
|
this.useGradient = true;
|
||||||
this.gradientStart = '#eb0042';
|
this.gradientStart = '#eb0042';
|
||||||
this.gradientStop = '#0042eb';
|
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() {
|
updateColors() {
|
||||||
// The || is to make sure that if the variable has been defined by a user override that value is to be used
|
// 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.useGradient = true;
|
||||||
this.gradientStart = '#eb0042';
|
this.gradientStart = '#eb0042';
|
||||||
this.gradientStop = '#0042eb';
|
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';
|
this.tertiaryColor = '#ffffff';
|
||||||
}
|
}
|
||||||
updateColors() {
|
updateColors() {
|
||||||
|
@@ -107,7 +107,7 @@ class Theme {
|
|||||||
this.useGradient = true;
|
this.useGradient = true;
|
||||||
this.gradientStart = this.primaryBorderColor;
|
this.gradientStart = this.primaryBorderColor;
|
||||||
this.gradientStop = this.secondaryBorderColor;
|
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() {
|
updateColors() {
|
||||||
this.secondBkg = lighten(this.contrast, 55);
|
this.secondBkg = lighten(this.contrast, 55);
|
||||||
|
Reference in New Issue
Block a user