Skip to content

Commit

Permalink
fix: get correct node handlers position
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjuanes authored Mar 5, 2023
1 parent ab79d14 commit 45d25c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions folio-core/components/Canvas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Canvas = props => {
const canvasRef = React.useRef(null);
const selectedElements = useSelectedElements(props);
const [canvasSize, setCanvasSize] = React.useState([100, 100]);
const bounds = selectedElements.length > 0 ? getRectangleBounds(selectedElements) : null;
const bounds = selectedElements.length > 1 ? getRectangleBounds(selectedElements) : null;

const handlePointerDown = (event, source, pointListener) => {
event.preventDefault();
Expand Down Expand Up @@ -207,7 +207,7 @@ export const Canvas = props => {
)}
{props.showHandlers && selectedElements.length === 1 && (
<Handlers
position={bounds}
position={selectedElements[0]}
edgeHandlers={selectedElements[0].edgeHandlers}
cornerHandlers={selectedElements[0].cornerHandlers}
nodeHandlers={selectedElements[0].nodeHandlers}
Expand Down

0 comments on commit 45d25c6

Please sign in to comment.