Remove render-time viewport focus sampling
This commit is contained in:
parent
f9b6d58f3e
commit
cf4d4a17e9
1 changed files with 1 additions and 10 deletions
|
|
@ -464,16 +464,7 @@ export function EpiphanyGraphViewer({
|
|||
selection?.kind === "node" && selection.graphKey === activeGraphKey && activeLayout
|
||||
? activeLayout.nodes.find((node) => node.id === selection.nodeId) ?? null
|
||||
: null;
|
||||
const viewportFocusedNode =
|
||||
focusSelection && activeLayout && viewportSize.width > 0 && viewportSize.height > 0
|
||||
? nodeNearestViewportCenter(
|
||||
activeLayout.nodes,
|
||||
activeTransform,
|
||||
viewportSize.width,
|
||||
viewportSize.height,
|
||||
)
|
||||
: null;
|
||||
const selectedNode = focusSelection ? viewportFocusedNode ?? selectionNode : selectionNode;
|
||||
const selectedNode = selectionNode;
|
||||
const selectedEdge =
|
||||
selection?.kind === "edge" && selection.graphKey === activeGraphKey && activeLayout
|
||||
? activeLayout.edges.find((edge) => edge.resolvedId === selection.edgeId) ?? null
|
||||
|
|
|
|||
Loading…
Reference in a new issue