You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a weird one - not sure quite exactly what the motivation behind the R.prototype.renderfix function was, but it's actually breaking things for me in Chrome/FF by adding left: -0.5px where everything is just fine the way it is.
Any idea what could be causing this? Will be happy to provide any more details if you let me know what's relevant, i.e. paddings, margins, borders etc. of the chart container, maybe something else?
Thanks
The text was updated successfully, but these errors were encountered:
I had the same problem. This was caused because renderfix wants to fix half pixels which cause SVG drawing errors. renderfix calls createSVGMatrix() which gets the placement offset then translates the object onto a whole pixel.
The -0.5px occurs in the following case.
My document.width was 109 pixels wide.
I had a container width of 100 pixels with margin set to auto. This corresponds to margins of 4.5px on each side.
The browser cannot draw subpixels so it will draw 5px on the left and 4px on the right. Javascript on the other hand DOES accept a float here. When createSVGMatrix() is called, it sees a left translation of 4.5px.
Raphael decided to check: if we are on a half pixel, let's shift the SVGSVGElement to a whole pixel, so that things look right. The result is a translation of -0.5px.
Hi there,
I've a weird one - not sure quite exactly what the motivation behind the R.prototype.renderfix function was, but it's actually breaking things for me in Chrome/FF by adding left: -0.5px where everything is just fine the way it is.
Any idea what could be causing this? Will be happy to provide any more details if you let me know what's relevant, i.e. paddings, margins, borders etc. of the chart container, maybe something else?
Thanks
The text was updated successfully, but these errors were encountered: