I know shit about Github and don't want to, but here is the issue.
The coordinate system of the canvas overlay does not match the image coordinate system.
replace line 98
var viewportZoom = this._viewer.viewport.getZoom(true);
with
var viewportZoom = this._viewer.viewport.viewportToImageZoom(this._viewer.viewport.getZoom(true));
and also replace line 123
context.scale(viewportZoom/2, viewportZoom/2);
with
context.scale(viewportZoom, viewportZoom);
I know shit about Github and don't want to, but here is the issue.
The coordinate system of the canvas overlay does not match the image coordinate system.
replace line 98
var viewportZoom = this._viewer.viewport.getZoom(true);with
var viewportZoom = this._viewer.viewport.viewportToImageZoom(this._viewer.viewport.getZoom(true));and also replace line 123
context.scale(viewportZoom/2, viewportZoom/2);with
context.scale(viewportZoom, viewportZoom);