Added a rect drawing method. Fixed generateLink to support json correctly. Fixed DomeElementProxy getPagePosition to support position relative to an ancestor. Also fixed how scroll offsets were calculated.