2
0

feat(editor): Zoom in/out

This commit is contained in:
Baptiste Arnaud
2022-04-08 14:30:46 -05:00
parent 6314ce2f62
commit c5d3b9214d
16 changed files with 336 additions and 63 deletions

View File

@ -58,11 +58,12 @@ export const DropOffEdge = ({
const block = publishedTypebot?.blocks.find(byId(blockId))
const sourceTop = useMemo(
() =>
getEndpointTopOffset(
sourceEndpoints,
graphPosition.y,
block?.steps[block.steps.length - 1].id
),
getEndpointTopOffset({
endpoints: sourceEndpoints,
graphOffsetY: graphPosition.y,
endpointId: block?.steps[block.steps.length - 1].id,
graphScale: graphPosition.scale,
}),
// eslint-disable-next-line react-hooks/exhaustive-deps
[block?.steps, sourceEndpoints, blocksCoordinates]
)