mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-17 15:29:25 +02:00
merge commit
This commit is contained in:
@@ -43,8 +43,7 @@ export const subroutine = async (parent: SVGAElement, node: Node) => {
|
|||||||
const h = bbox.height + node.padding;
|
const h = bbox.height + node.padding;
|
||||||
const x = -bbox.width / 2 - halfPadding;
|
const x = -bbox.width / 2 - halfPadding;
|
||||||
const y = -bbox.height / 2 - halfPadding;
|
const y = -bbox.height / 2 - halfPadding;
|
||||||
let rect;
|
|
||||||
const { cssStyles } = node;
|
|
||||||
const points = [
|
const points = [
|
||||||
{ x: 0, y: 0 },
|
{ x: 0, y: 0 },
|
||||||
{ x: w, y: 0 },
|
{ x: w, y: 0 },
|
||||||
@@ -69,9 +68,10 @@ export const subroutine = async (parent: SVGAElement, node: Node) => {
|
|||||||
|
|
||||||
shapeSvg.insert(() => l1, ':first-child');
|
shapeSvg.insert(() => l1, ':first-child');
|
||||||
shapeSvg.insert(() => l2, ':first-child');
|
shapeSvg.insert(() => l2, ':first-child');
|
||||||
rect = shapeSvg.insert(() => roughNode, ':first-child');
|
const rect = shapeSvg.insert(() => roughNode, ':first-child');
|
||||||
|
const { cssStyles } = node;
|
||||||
rect.attr('class', 'basic label-container').attr('style', cssStyles);
|
rect.attr('class', 'basic label-container').attr('style', cssStyles);
|
||||||
|
updateNodeBounds(node, rect);
|
||||||
} else {
|
} else {
|
||||||
const el = insertPolygonShape(shapeSvg, w, h, points);
|
const el = insertPolygonShape(shapeSvg, w, h, points);
|
||||||
if (nodeStyles) {
|
if (nodeStyles) {
|
||||||
|
Reference in New Issue
Block a user