2
0

perf(flow): ️ Smooth panning even with complexe flow

This commit is contained in:
Baptiste Arnaud
2022-03-02 12:21:32 +01:00
parent 3c6783727e
commit e9a9dc00e2
6 changed files with 63 additions and 58 deletions

View File

@ -24,7 +24,7 @@ export const DropOffEdge = ({
onUnlockProPlanClick,
}: Props) => {
const { user } = useUser()
const { sourceEndpoints, blocksCoordinates, graphOffsetY } = useGraph()
const { sourceEndpoints, blocksCoordinates, graphPosition } = useGraph()
const { publishedTypebot } = useTypebot()
const isUserOnFreePlan = isFreePlan(user)
@ -60,7 +60,7 @@ export const DropOffEdge = ({
() =>
getEndpointTopOffset(
sourceEndpoints,
graphOffsetY,
graphPosition.y,
block?.steps[block.steps.length - 1].id
),
// eslint-disable-next-line react-hooks/exhaustive-deps