Take element offset into account when resizing

Take the element offset and scroll position into account when dragging a splitbar.  Fixes #52.