-
Hi, We have built a functioning prototype with Konva and it looks very promising. We are now working on exporting function. The use case is that we will have a group of shapes that need to be exported exactly the size of the wrapping rect that covers all the shapes, including shadows of all the shapes. How to calculate this wrapping rect? I understand there is a Or is there a better way to get the exact Thanks again for this great lib. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't really understand what you can't use // calculate clean rectangle relative to stage node
// it means it will ignore stage transforms
node.getClientRect({ relativeTo: stage }); |
Beta Was this translation helpful? Give feedback.
I don't really understand what you can't use
node.getClientRect()
. It should give you exactly what you want. If you need relative results, you can userelativeTo
argument: