S.Chrobak S.Chrobak - 1 year ago 201
Javascript Question

Raphael.js function getBBox give back NAN/NAN/NAN in IE8

using Raphaƫl 2.1.4 - JavaScript Vector Library
do something like that:

var textDummy = paper.text(50,500, 'hello world').attr({fill: 'transparent', 'font-size': 14});
var textBox = textDummy.getBBox();

with chrome and firefox everything is fine,
but in IE8 it give back NaN/NaN/NaN,
par exemple textBox.height is NaN.

how i can fix this?

Answer Source

i found a workaround solution from this answer to the question "Raphael JS and Text positioning"

If i use _getBBox() instead of getBBox() everything is working in ie 8 also.

_getBBox() is undocumented but used internally by Raphael itself, and it works!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download