Make cross-hairs update correctly on page load
Irev-Dev opened this issue · 2 comments
Irev-Dev commented
@elistone Has done a great job in #6 getting toggle-able crosshairs working. However when the page loads the cross hairs don't appear until he images are interacted with, and toggling the cross hairs before the images have been interacted with also doesn't work.
hint, likely related to this (in MRI-Volume-Slice.js line: 220)
hideCrossHairs(){
this.useCrosshairs = false;
if(this.lastEvent){
this.updateCanvases(this.lastEvent);
}
}
it uses the last event (a mouse event) and on page load there hasn't been any mouse events on the images yet.
Irev-Dev commented
Sorry @cesar-cb, @ismaeldcom beat you to the punch, I went to bed as soon as I wrote this issue, otherwise I would have replied.
Thanks for the fix @ismaeldcom (#12).