Shapes going out of proportion in responsive canvas
I am trying to learn Konva.js to build a game and one of my biggest priorities is that the canvas should be responsive in width and height. I have managed to achieve that but when I resize my browser, the shapes strech out of proportion. I have a few guesses that I have to update the X and Y of the shape when the window resizes, but being new to this framework, I don’t have a idea how to implement that.
This is my code-