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

Synteny view drawings can vary slightly between browser and scroll state #4432

Open
cmdcolin opened this issue Jun 10, 2024 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@cmdcolin
Copy link
Collaborator

The linear synteny view with all the polygons uses a render optimization where multiple drawing operations are batched into a single operation (multiple line drawing operations get a single canvas.stroke() and it draws a "polyline")

see

// ctx.stroke once is much more efficient than calling stroke() many times

this does speed it up but it results in different alpha blending on chrome vs firefox sometimes with firefox appearing more "pale" due to the lack of alpha blending on the polyline not stacking up darker and darker alpha blends

options to address this could include

a) do nothing
b) gather user feedback to see how much it matters
c) remove the optimization, should "fix" it
d) fix it some other way that preserves polyline, or only remove polyline on firefox
e) don't use the alpha channel at all, and just always use flat colors, or use flat colors by default
f) see what the situation looks like after implementing other synteny coloring options

those are not all mutually exclusive...

@cmdcolin cmdcolin added the enhancement New feature or request label Jun 10, 2024
@cmdcolin
Copy link
Collaborator Author

firefox initial page load

Screenshot 2024-06-10 at 2 52 39 PM

firefox after scrolling around a bit

Screenshot 2024-06-10 at 2 52 27 PM

chrome initial page load

Screenshot 2024-06-10 at 2 53 29 PM

@cmdcolin
Copy link
Collaborator Author

note: i am not exactly sure why scrolling around in firefox starts to enable the alpha blending

@cmdcolin
Copy link
Collaborator Author

note that after " f) see what the situation looks like after implementing other synteny coloring options" it may be harder to do polylines as all the elements of a polylines are a single color

@cmdcolin cmdcolin changed the title Synteny view drawings can vary slightly between browser and currently scroll state Synteny view drawings can vary slightly between browser and scroll state Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant