- From: Jochen Kühner <notifications@github.com>
- Date: Thu, 20 Jun 2024 22:12:46 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 21 June 2024 05:12:50 UTC
### 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=%3Cbutton%20style=%22width:80px;height:30px;position:absolute;left:175px;top:107px;transform:rotate(-45deg);%22%3EButton%3C/button%3E (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. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/1294 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/1294@github.com>
Received on Friday, 21 June 2024 05:12:50 UTC