I'm testing 4.1.1 RC2 in Chrome and have a sprite that I'm trying to get the height of. Sprite.el.getWidth() works as expected. Sprite.el.getHeight() returns 0.
Get NaN in Firefox. Again, width is ok
Printable View
I'm testing 4.1.1 RC2 in Chrome and have a sprite that I'm trying to get the height of. Sprite.el.getWidth() works as expected. Sprite.el.getHeight() returns 0.
Get NaN in Firefox. Again, width is ok
The same happens in 4.0.x, you should use the getBBox() method.
The height/width being off from the pixels threw me. Used the surface's viewBoxShift.scale to adjust for it and was having a hard time finding the surface's left/top edge. Found I could use surface.bgRect.getX() and getY() and everything lines up perfect.
Any idea if surface.bgRect could be declared a public property in the API? :D