Proposal: getCornerPoints() #1294
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
What problem are you trying to solve?
For a designer application you need the 4 corner points of a element to draw overlays.
What solutions exist today?
You only could use the getBoundClientRect API, or combine all transformations and positionings and calculate the real element position manually
How would you solve it?
Add an API to Element (getCornerPoints) wich returns an array of 4 points wich are the transformed points according to window.
Anything else?
sample what I need: https://node-projects.github.io/web-component-designer-demo/index.html?html=
(click on the button to see the overlay)
This works now, but is slow and error prone. And it does not work correctly for transformed SVG element parts.
The text was updated successfully, but these errors were encountered: