Fixed #46 by changing the way diagram is scrolled and zoomed.