Snap.svg bounding box not updated on child element

2019-08-27 18:08发布

Codepen: http://codepen.io/anon/pen/dfIBv

I have two rectangles in g element on which I apply transform. GetBBox method shows same numbers after and before transform.

If I apply same transform directly on those rectangles, getBBox method shows correct measurements.

Is there any way how to get "correct" measurements of these rectangles after applying transform to parent group element?

Thanks!

1条回答
来,给爷笑一个
2楼-- · 2019-08-27 18:24

Ian is correct. element.node.getBoundingClientRect() shows correct measurements. Thank you :)

查看更多
登录 后发表回答