Search code examples
javascriptcanvasrectangleskonvajs

Konva.js. Resize rect by bounds in Transform.js


By default konva-transformer use little rectangles in the middle of the border (middle-left, middle-right, top-center, bottom-center) . But i want to change resize by borders, like thatenter image description here

Is there any library that solves my problem or an easy way to implement it?


Solution

  • Look at the example, you just need to update the logic in the Transformer class

    codesandbox.io/s/he5jq?file=/src/index.js