Closed
Bug 1073909
Opened 10 years ago
Closed 10 years ago
getBoundingClientRect does not give where the element is located.
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jackiszhp, Unassigned)
References
Details
Attachments
(1 file, 2 obsolete files)
4.10 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 Build ID: 20140924083558 Steps to reproduce: >var e=document.getElementById('svgID1'); >e //show e <svg id="svgID1" width="300px" height="300px" version="1.1px" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg" viewBox="44800 266.5 300 300"> >e.getBoundingClientRect(); //show the rectangle Actual results: DOMRect { x=-44792.5, y=-202, width=44951, more...} Expected results: Here, we can see that x is -44792.5, I thought it should be where the svg element is located. If it is in fact not the right way to get where the element is located, then what is the right way?
Comment 1•10 years ago
|
||
Please add a complete testcase to the bug as an attachment.
Flags: needinfo?(jackiszhp)
Reporter | ||
Comment 2•10 years ago
|
||
To show that I am not able to get the position of an SVG element as the position of other html elements.
Flags: needinfo?(jackiszhp)
Reporter | ||
Updated•10 years ago
|
Attachment #8496607 -
Attachment is obsolete: true
Reporter | ||
Comment 3•10 years ago
|
||
To show I am not able to get the position information of the SVG element, as I can do for all other html elements. If the kind of results is right for a svg element, then how do I get the position information as I usually do for other html elements?
Reporter | ||
Updated•10 years ago
|
Attachment #8496609 -
Attachment is obsolete: true
Reporter | ||
Comment 4•10 years ago
|
||
To show that I am not able to get the position information for the SVG element as I do so for other html elements. If this result is right, then how do I get the position information for the SVG element?
Comment 5•10 years ago
|
||
This was fixed in Firefox 33.
You need to log in
before you can comment on or make changes to this bug.
Description
•