Draft of fifth set of shapes [Lined Process, Delay, Multiprocess, Stored Data, Internal storage]

This commit is contained in:
omkarht
2025-01-17 13:06:53 +05:30
parent 51756edefc
commit 5b6c5412cd
5 changed files with 11 additions and 11 deletions

View File

@@ -89,8 +89,8 @@ export async function bowTieRect<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;
const calcTotalHeight = (labelHeight: number) => labelHeight + labelPaddingY * 2;
const calcEllipseRadius = (totalHeight: number) => {

View File

@@ -21,8 +21,8 @@ export async function halfRoundedRectangle<T extends SVGGraphicsElement>(
const minWidth = 15,
minHeight = 10;
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' ? 12 : (node.padding ?? 0);
if (node.width || node.height) {
node.height = (node?.height ?? 0) - paddingY * 2;

View File

@@ -9,8 +9,8 @@ export async function multiRect<T extends SVGGraphicsElement>(parent: D3Selectio
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 rectOffset = node.look === 'neo' ? 10 : 5;
// If incoming height & width are present, subtract the padding from them

View File

@@ -16,8 +16,8 @@ export async function shadedProcess<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' ? 13 : (node.padding ?? 0);
// If incoming height & width are present, subtract the padding from them
// as labelHelper does not take padding into account

View File

@@ -6,14 +6,14 @@ import intersect from '../intersect/index.js';
import type { D3Selection } from '../../../types.js';
/// Width of the frame on the top and left of the shape
const rectOffset = 5;
const rectOffset = 10;
export async function windowPane<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {
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) * 2 : (node.padding ?? 0);
const paddingX = node.look === 'neo' ? 16 : (node.padding ?? 0);
const paddingY = node.look === 'neo' ? 12 : (node.padding ?? 0);
// If incoming height & width are present, subtract the padding from them
// as labelHelper does not take padding into account