mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 13:29:40 +02:00
Fix for class title label css
This commit is contained in:
@@ -58,7 +58,7 @@ describe('State diagram', () => {
|
|||||||
);
|
);
|
||||||
cy.get('svg');
|
cy.get('svg');
|
||||||
});
|
});
|
||||||
it('v2 should render a transition descrions with new lines', () => {
|
it('v2 should render a transition descriptions with new lines', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
stateDiagram-v2
|
stateDiagram-v2
|
||||||
|
@@ -39,7 +39,7 @@ export const insertEdgeLabel = (elem, edge) => {
|
|||||||
edgeLabels[edge.id] = edgeLabel;
|
edgeLabels[edge.id] = edgeLabel;
|
||||||
|
|
||||||
// Update the abstract data of the edge with the new information about its width and height
|
// Update the abstract data of the edge with the new information about its width and height
|
||||||
edge.width = bbox.width;
|
edge.width = bbox.width + 40;
|
||||||
edge.height = bbox.height;
|
edge.height = bbox.height;
|
||||||
|
|
||||||
if (edge.startLabelLeft) {
|
if (edge.startLabelLeft) {
|
||||||
|
@@ -596,6 +596,7 @@ const class_box = (parent, node) => {
|
|||||||
const classTitleLabel = labelContainer
|
const classTitleLabel = labelContainer
|
||||||
.node()
|
.node()
|
||||||
.appendChild(createLabel(classTitleString, node.labelStyle, true, true));
|
.appendChild(createLabel(classTitleString, node.labelStyle, true, true));
|
||||||
|
select(classTitleLabel).attr('class', 'classTitle');
|
||||||
let classTitleBBox = classTitleLabel.getBBox();
|
let classTitleBBox = classTitleLabel.getBBox();
|
||||||
if (getConfig().flowchart.htmlLabels) {
|
if (getConfig().flowchart.htmlLabels) {
|
||||||
const div = classTitleLabel.children[0];
|
const div = classTitleLabel.children[0];
|
||||||
|
@@ -6,9 +6,11 @@ const getStyles = options =>
|
|||||||
font-family: ${options.fontFamily};
|
font-family: ${options.fontFamily};
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
|
|
||||||
.title {
|
|
||||||
font-weight: bolder;
|
}
|
||||||
}
|
|
||||||
|
.classTitle {
|
||||||
|
font-weight: bolder;
|
||||||
}
|
}
|
||||||
.node rect,
|
.node rect,
|
||||||
.node circle,
|
.node circle,
|
||||||
|
Reference in New Issue
Block a user