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

@ -32,7 +32,7 @@ export const StepNodesList = ({
setDraggedStepType,
} = useStepDnd()
const { typebot, createStep, detachStepFromBlock } = useTypebot()
const { isReadOnly } = useGraph()
const { isReadOnly, graphPosition } = useGraph()
const [expandedPlaceholderIndex, setExpandedPlaceholderIndex] = useState<
number | undefined
>()
@ -166,8 +166,9 @@ export const StepNodesList = ({
top="0"
left="0"
style={{
transform: `translate(${position.x}px, ${position.y}px) rotate(-2deg)`,
transform: `translate(${position.x}px, ${position.y}px) rotate(-2deg) scale(${graphPosition.scale})`,
}}
transformOrigin="0 0 0"
/>
</Portal>
)}