Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved mirroring #484

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

improved mirroring #484

wants to merge 5 commits into from

Conversation

barrettMCW
Copy link
Contributor

Fixed the jitter from panning while rotated, and it seems at some point in the pr process drawing the rois while mirrored broke. Fixed it up. Still couldn't get projections to work. I do think that would be the most robust way to handle this but I'll take another crack at projections next time something breaks. Thanks y'all!

@will-moore
Copy link
Member

Thanks for this - apologies for the delayed response.
It's working nicely and fixes the crazy jitter on dragging when rotated. It also fixes the ROI drawing when flipped.
However, the dragging of the image when flipped is opposite to the expected direction (the flipping is not taken into account to reverse the direction of drag).

NB: I also found it a little tricky to know when the image was flipped as there's no indicator. This is outside the scope of the PR so no need to address it now unless you want to, e.g. add some visual clue to the flip buttons when they are enabled?

@barrettMCW
Copy link
Contributor Author

That's strange... I added a mitigation specifically to fix that on my end line 80

Can you give me some more info about how you're testing it? I'm viewing it with npm run dev on chrome.
I like the flipped indicator idea! I'll add it quick.

@will-moore
Copy link
Member

That's weird. I'm building with npm run debug or npm run prod then opening iviewer from webclient.
However, if I use npm run dev then I don't see the bug (same as you).

@barrettMCW
Copy link
Contributor Author

added flip indicator, not pretty lol but distinct between flipped and not flipped.
the prod vs dev is a real head scratcher though, I'll keep looking into it

@barrettMCW
Copy link
Contributor Author

Think I might have gotten it figured out? I was looking at the name of the constructor which gets minified in prod. Hopefully that was it, I don't have an easy way of testing this out, let me know if it's still an issue then I'll set up a proper dev environment to test this more thoroughly.
Thanks!

Copy link
Member

@will-moore will-moore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fixed it - thanks!
Looking good - approved.

I noticed one tiny issue which I'll mention in case you can find a fix (but isn't a blocker on this PR which already has plenty of fixes)... The blue rectangle that appears when you hold Command-drag to select a bunch of ROIs is flipped on the screen (although the ROIs are correctly selected from the area that was actually dragged over).

@barrettMCW
Copy link
Contributor Author

Great catch! Thanks! (didn't know you could do that lol) It's mostly fixed. It captures extents properly but for whatever reason it doesn't render when only X is mirrored. When just Y or X and Y are mirrored it works perfectly but X is misbehaving. Still captures properly so I think it's better than it was.

@barrettMCW
Copy link
Contributor Author

Still haven't figured out roi popups yet. I'll skip that this PR, but if there's anything else you find, let me know. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants