Hi I'm very lost on how to accomplish this. I'm basically trying to zoom into some content when it is added to the stage.
I have one stage and one layer. Some shapes are added to the layer, let's say some Lines are added with some predefined points (array of X and Y coordinates). When this shapes are added, I want to change the X,Y and scale of the stage so that the new shapes are centered and fit nicely in the screen. Without resizing or changing at all the shapes.
When the shapes are added, they can be totally out of view with a random size, very small or big. So I want to zoom in or out to fill or fit the view for the user with this content.
I don't know if there is anything specific to Konva about this really. I hope someone can point me in the right direction, thanks.