Merge pull request #814 from g-div/v2.1.2

fix the error/memleak in Firefox 3.0.x and 25.0.1 concerning getBBox
This commit is contained in:
Tomas Alabes 2013-12-09 17:33:41 -08:00
commit b5bca4b855
3 changed files with 17 additions and 5 deletions

View File

@ -917,7 +917,13 @@ window.Raphael && window.Raphael.svg && function(R) {
try {
bbox = this.node.getBBox();
} catch(e) {
// Firefox 3.0.x plays badly here
// Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix
bbox = {
x: this.node.clientLeft,
y: this.node.clientTop,
width: this.node.clientWidth,
height: this.node.clientHeight
}
} finally {
bbox = bbox || {};
if(canvasHidden){

6
raphael-min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -6717,7 +6717,13 @@
try {
bbox = this.node.getBBox();
} catch(e) {
// Firefox 3.0.x plays badly here
// Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix
bbox = {
x: this.node.clientLeft,
y: this.node.clientTop,
width: this.node.clientWidth,
height: this.node.clientHeight
}
} finally {
bbox = bbox || {};
if(canvasHidden){