Merge branch 'develop' into feat/update-zenuml-core-to-3_31_1-rebased

This commit is contained in:
Peng Xiao
2025-05-14 22:00:31 +10:00
committed by GitHub
3 changed files with 18 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ export async function erBox<T extends SVGGraphicsElement>(parent: D3Selection<T>
let TEXT_PADDING = config.er?.entityPadding ?? 6;
const { cssStyles } = node;
const { labelStyles } = styles2String(node);
const { labelStyles, nodeStyles } = styles2String(node);
// Draw rect if no attributes are found
if (entityNode.attributes.length === 0 && node.label) {
@@ -295,6 +295,18 @@ export async function erBox<T extends SVGGraphicsElement>(parent: D3Selection<T>
updateNodeBounds(node, rect);
if (nodeStyles && node.look !== 'handDrawn') {
const allStyle = nodeStyles.split(';');
const strokeStyles = allStyle
?.filter((e) => {
return e.includes('stroke');
})
?.map((s) => `${s}`)
.join('; ');
shapeSvg.selectAll('path').attr('style', strokeStyles ?? '');
shapeSvg.selectAll('.row-rect-even path').attr('style', nodeStyles);
}
node.intersect = function (point) {
return intersect.rect(node, point);
};

View File

@@ -23,14 +23,6 @@ If you need to use mermaid in your project, please install the full [`mermaid` p
## Usage via CDN
### Latest version
```html
<script src="https://cdn.jsdelivr.net/npm/@mermaid-js/tiny/dist/mermaid.tiny.js"></script>
```
### Specific version
```html
<!-- Format -->
<script src="https://cdn.jsdelivr.net/npm/@mermaid-js/tiny@<MERMAID_MAJOR_VERSION>/dist/mermaid.tiny.js"></script>