Draft of third set of shapes [Divided Process, Manual Input,Subprocess, Horizontal Cylinder, Loop Limit]

This commit is contained in:
omkarht
2025-01-16 17:04:54 +05:30
parent 6e3c37c98b
commit 4e685b74a7
5 changed files with 9 additions and 9 deletions

View File

@@ -12,8 +12,8 @@ export async function dividedRectangle<T extends SVGGraphicsElement>(
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const paddingX = node.look === 'neo' ? (node.padding ?? 0) * 2 : (node.padding ?? 0);
const paddingY = node.look === 'neo' ? (node.padding ?? 0) * 1 : (node.padding ?? 0);
const paddingX = node.look === 'neo' ? 16 : (node.padding ?? 0);
const paddingY = node.look === 'neo' ? 16 : (node.padding ?? 0);
// If incoming height & width are present, subtract the padding from them
// as labelHelper does not take padding into account

View File

@@ -9,8 +9,8 @@ export async function slopedRect<T extends SVGGraphicsElement>(parent: D3Selecti
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const nodePadding = node.padding ?? 0;
const labelPaddingX = node.look === 'neo' ? nodePadding * 2 : nodePadding;
const labelPaddingY = node.look === 'neo' ? nodePadding * 1 : nodePadding;
const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;
const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;
// If incoming height & width are present, subtract the padding from them
// as labelHelper does not take padding into account

View File

@@ -44,8 +44,8 @@ export async function subroutine<T extends SVGGraphicsElement>(parent: D3Selecti
node.labelStyle = labelStyles;
const nodePadding = node?.padding || 8;
const labelPaddingX = node.look === 'neo' ? nodePadding * 3 : nodePadding;
const labelPaddingY = node.look === 'neo' ? nodePadding * 1.5 : nodePadding;
const labelPaddingX = node.look === 'neo' ? 28 : nodePadding;
const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;
// If incoming height & width are present, subtract the padding from them
// as labelHelper does not take padding into account

View File

@@ -61,7 +61,7 @@ export async function tiltedCylinder<T extends SVGGraphicsElement>(
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const nodePadding = node.padding ?? 0;
const labelPadding = node.look === 'neo' ? nodePadding : nodePadding / 2;
const labelPadding = node.look === 'neo' ? 12 : nodePadding / 2;
if (node.width || node.height) {
const originalHeight = node.height ?? 0;
node.height = (node.height ?? 0) - labelPadding;

View File

@@ -12,8 +12,8 @@ export async function trapezoidalPentagon<T extends SVGGraphicsElement>(
const { labelStyles, nodeStyles } = styles2String(node);
node.labelStyle = labelStyles;
const nodePadding = node.padding ?? 0;
const labelPaddingX = node.look === 'neo' ? nodePadding * 2 : nodePadding;
const labelPaddingY = node.look === 'neo' ? nodePadding * 1 : nodePadding;
const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;
const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;
const minWidth = 15,
minHeight = 5;
if (node.width || node.height) {