From 6b09ec594dbb89224b2c9bdf3a896569179f4319 Mon Sep 17 00:00:00 2001 From: Craig Harshbarger Date: Sun, 22 Oct 2023 21:12:24 -0500 Subject: [PATCH] Rename box variables to bar --- src/factories/nodeFlowRun.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/factories/nodeFlowRun.ts b/src/factories/nodeFlowRun.ts index 07a3c624..c3285f68 100644 --- a/src/factories/nodeFlowRun.ts +++ b/src/factories/nodeFlowRun.ts @@ -35,9 +35,9 @@ export async function flowRunContainerFactory(node: RunGraphNode) { async function render(node: RunGraphNode): Promise { const label = await renderLabel(node) - const box = await renderBar(node) + const bar = await renderBar(node) - label.position = getLabelPosition(label, box) + label.position = getLabelPosition(label, bar) return container } @@ -54,11 +54,11 @@ export async function flowRunContainerFactory(node: RunGraphNode) { } } - function getLabelPosition(label: BitmapText, box: Container): Pixels { + function getLabelPosition(label: BitmapText, bar: Container): Pixels { // todo: this should probably be nodePadding const margin = config.styles.nodeMargin - const inside = box.width > margin + label.width + margin - const y = box.height / 2 - label.height + const inside = bar.width > margin + label.width + margin + const y = bar.height / 2 - label.height if (inside) { return { @@ -68,7 +68,7 @@ export async function flowRunContainerFactory(node: RunGraphNode) { } return { - x: box.width + margin, + x: bar.width + margin, y, } }