KineticJS
KineticJS copied to clipboard
[feature] getBoundingClientRect for any node
Hi, guys. I am thinking about adding new method getBoundingClientRect that will return object with x, y, width and height properties. Also the method will take into account:
- offset
- shadow
- stroke
- scale
- group
That will allow us:
- easy getting width and height values for groups
- much better default caching behaviour
- One way to detect position and size of nodes. (for example {x,y} of circle is center, but {x,y} of rect is top left point)
- more...
Any thoughts?
really great idea ! I had to deal with such a case in one of my projects. If you implement it, I will try it immediatly.