mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-12-25 05:36:23 +01:00
Compare commits
2 Commits
develop
...
fix-7214-h
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13d9bfa474 | ||
|
|
7a14a1ac40 |
5
.changeset/grumpy-singers-cheer.md
Normal file
5
.changeset/grumpy-singers-cheer.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'mermaid': patch
|
||||
---
|
||||
|
||||
fix: Ensure block diagram hexagon blocks respect column spanning syntax
|
||||
@@ -404,6 +404,18 @@ describe('Block diagram', () => {
|
||||
a
|
||||
b
|
||||
a --- b
|
||||
`,
|
||||
{}
|
||||
);
|
||||
});
|
||||
|
||||
it('BL32: hexagon shape block should span correctly', () => {
|
||||
imgSnapshotTest(
|
||||
`block-beta
|
||||
columns 3
|
||||
A1{{"Opening tag"}} space A3{{"Closing tag"}}
|
||||
B1["<tagname>"] B2["content"] B3["</tagname>"]
|
||||
C{{"Element"}}:3
|
||||
`,
|
||||
{}
|
||||
);
|
||||
|
||||
@@ -96,9 +96,9 @@ const hexagon = async (parent, node) => {
|
||||
);
|
||||
|
||||
const f = 4;
|
||||
const h = bbox.height + node.padding;
|
||||
const h = node.positioned ? node.height : bbox.height + node.padding;
|
||||
const m = h / f;
|
||||
const w = bbox.width + 2 * m + node.padding;
|
||||
const w = node.positioned ? node.width : bbox.width + 2 * m + node.padding;
|
||||
const points = [
|
||||
{ x: m, y: 0 },
|
||||
{ x: w - m, y: 0 },
|
||||
|
||||
Reference in New Issue
Block a user