Gisellameloni / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

Firefox 32 & use elements: bounding box with wrong size and wrong position #1238

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a SVG with an use element inside
2. Selecting the element will show the bounding box at wrong position

Error appears in Firefox 32 ! Firefox 31 and other browsers work fine. 
FF32's getBBox() doesnt seem to deliver the right values. 
I made a quick fix in svgutils.js (svgedit.utilities.getBBox()) by adding

**********************
if (navigator.userAgent.indexOf('Firefox') != -1 && 
parseFloat(navigator.userAgent.substring(navigator.userAgent.indexOf('Firefox') 
+ 8)) >= 32){
ret = selected.getBBox();
}
*********************

at the end of the default case.

Original issue reported on code.google.com by Lucian.D...@gmail.com on 17 Sep 2014 at 8:10