Adding subroutine fill

This commit is contained in:
Knut Sveidqvist
2024-08-06 14:29:33 +02:00
parent 2ee94eb9ae
commit 3321f6472f

View File

@@ -76,7 +76,7 @@ export const subroutine = async (parent: SVGAElement, node: Node) => {
// options.strokeWidth = 0 // options.strokeWidth = 0
} }
rc.rectangle(x - 8, y, w + 16, h, options); const roughNode = rc.rectangle(x - 8, y, w + 16, h, options);
const l1 = rc.line(x, y, x, y + h, options); const l1 = rc.line(x, y, x, y + h, options);
const l2 = rc.line(x + w, y, x + w, y + h, options); const l2 = rc.line(x + w, y, x + w, y + h, options);
@@ -84,9 +84,9 @@ export const subroutine = async (parent: SVGAElement, node: Node) => {
const l2El = shapeSvg.insert(() => l2, ':first-child'); const l2El = shapeSvg.insert(() => l2, ':first-child');
l1El.attr('class', 'neo-line'); l1El.attr('class', 'neo-line');
l2El.attr('class', 'neo-line'); l2El.attr('class', 'neo-line');
// rect = shapeSvg.insert(() => roughNode, ':first-child'); let 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);
} else { } else {
const el = insertPolygonShape(shapeSvg, w, h, points); const el = insertPolygonShape(shapeSvg, w, h, points);
if (nodeStyles) { if (nodeStyles) {