diff --git a/libs/shared/lib/vis/visualizations/nodelinkvis/components/NLPixi.tsx b/libs/shared/lib/vis/visualizations/nodelinkvis/components/NLPixi.tsx index 9d59adebdfac5c26fcaa2c8950bba76ebf210497..e6f199d3455ac8eeac43e9a0cc297d7e45bef87f 100644 --- a/libs/shared/lib/vis/visualizations/nodelinkvis/components/NLPixi.tsx +++ b/libs/shared/lib/vis/visualizations/nodelinkvis/components/NLPixi.tsx @@ -163,7 +163,7 @@ export const NLPixi = (props: Props) => { onMouseUpStage(event: FederatedPointerEvent) { if (props.configuration.showPopUpOnHover) return; - + // If its a short click (not a drag) on the stage but not on a node: clear the selection and remove all popups. const holdDownTime = event.timeStamp - (event as any).mouseDownTimeStamp; if (holdDownTime < mouseClickThreshold) { @@ -198,7 +198,7 @@ export const NLPixi = (props: Props) => { }, onMoved(event: MovedEvent) { if (props.configuration.showPopUpOnHover) return; - + for (const popup of popups) { if (popup.node.x == null || popup.node.y == null) continue; popup.pos.x = event.viewport.transform.position.x + popup.node.x * event.viewport.scale.x; @@ -632,18 +632,22 @@ export const NLPixi = (props: Props) => { <Tooltip key={popup.node._id} open={true} boundaryElement={ref} showArrow={true}> <TooltipTrigger x={popup.pos.x} y={popup.pos.y} /> <TooltipContent> - <NLPopup onClose={() => {}} data={{node: props.graph.nodes[popup.node._id], pos: popup.pos}} key={popup.node._id} /> + <NLPopup onClose={() => {}} data={{ node: props.graph.nodes[popup.node._id], pos: popup.pos }} key={popup.node._id} /> </TooltipContent> </Tooltip> ))} - {quickPopup != null && + {quickPopup != null && ( <Tooltip key={quickPopup.node._id} open={true} boundaryElement={ref} showArrow={true}> <TooltipTrigger x={quickPopup.pos.x} y={quickPopup.pos.y} /> <TooltipContent> - <NLPopup onClose={() => {}} data={{node: props.graph.nodes[quickPopup.node._id], pos: quickPopup.pos}} key={quickPopup.node._id} /> + <NLPopup + onClose={() => {}} + data={{ node: props.graph.nodes[quickPopup.node._id], pos: quickPopup.pos }} + key={quickPopup.node._id} + /> </TooltipContent> </Tooltip> - } + )} <div className="h-full w-full overflow-hidden" ref={ref}