cache all dom dims where possible; use client dims

- use getBoundingClientRect()
- fixes #514