react-konva dragBound a zoomable stage

Viewed 640

I am trying to make an application with react-konva in which an image covers the entire stage and the stage is draggable and zoomable. So I am looking for a way to bound the drag to the edges of the image.


I looked at this demo and added a dragBoundFunc in my code but using this code I am able to dragBound my stage on the top and left edges only.

Demo: https://codesandbox.io/s/tender-chatterjee-ih31j

1 Answers
Related