Changed height calculation for autoResize
Added canvas scroll to method