Skip to content

Commit

Permalink
Temp: Remove the placeholder label
Browse files Browse the repository at this point in the history
  • Loading branch information
lordrip committed Nov 28, 2024
1 parent 9399340 commit 2674cff
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const PlaceholderNode: FunctionComponent<CustomNodeProps> = observer(({ e
const vizNode: IVisualizationNode | undefined = element.getData()?.vizNode;
const settingsAdapter = useContext(SettingsContext);
const label = vizNode?.getNodeLabel(settingsAdapter.getSettings().nodeLabel);
const updatedLabel = label === 'placeholder' ? '' : label;
const tooltipContent = 'Click to insert a step';
const boxRef = useRef<Rect>(element.getBounds());
const labelX = (boxRef.current.width - CanvasDefaults.DEFAULT_LABEL_WIDTH) / 2;
Expand All @@ -47,7 +48,7 @@ export const PlaceholderNode: FunctionComponent<CustomNodeProps> = observer(({ e
</div>
</foreignObject>

{label && (
{updatedLabel && (
<foreignObject
x={labelX}
y={boxRef.current.height - 1}
Expand All @@ -56,7 +57,7 @@ export const PlaceholderNode: FunctionComponent<CustomNodeProps> = observer(({ e
className="placeholder-node__label"
>
<div className="placeholder-node__label__text">
<span title={tooltipContent}>{label}</span>
<span title={tooltipContent}>{updatedLabel}</span>
</div>
</foreignObject>
)}
Expand Down

0 comments on commit 2674cff

Please sign in to comment.