- From: Jochen Kühner via GitHub <sysbot+gh@w3.org>
- Date: Mon, 01 Jul 2024 06:18:14 +0000
- To: public-css-archive@w3.org
jogibear9988 has just created a new issue for https://github.com/w3c/csswg-drafts: == [cssom] Element (or Node) should contain the properties offset... (offsetParent, offsetLeft, ...) == # Problem I'm writing a Designer Application, where I show overlays for all Elements (like the Dev Tools). For this to work, I need to calculate the the corners of the rect of an Element. This works using getBoundingClientRect, but only if the Element is not transformed. If the Element for example is rotated, this will not return the points of the elemnt, but the outer rect. And also a elemnt could be inside of another transformed element (and so on). I know calculate the combined transformation of the elemnt, but for this I need the position of the element inside of it's container. This works on HTMLElements (caus they have offsetLeft and offsetTop), but not on SVG or MathML Elements. As also MathML and SVG Elements could be aligned inside of HTMLElements, they should also contain these Properties. And also, as they also could be positioned absolutely, they should contain the "offsetParent", to get to wich they are positioned to. Additional, as also a TextNode could be positioned inside of a container, I think it should also get the "offset..." Properties. So maybe it should be added to the "Node" Interface insted of the "Element" interface. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10514 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 1 July 2024 06:18:15 UTC