merge commit

This commit is contained in:
Ashish Jain
2024-08-09 16:53:35 +02:00

View File

@@ -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) {