mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
Merge branch 'develop' into feat/update-zenuml-core-to-3_31_1-rebased
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user