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

Fix dark redraw on selected features after vertical resize of the synteny canvas #4626

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Oct 29, 2024

Fixes #4625

the cause of the issue was the the code assumed that the "callback" ctx=>ctx.stroke() or ctx=>ctx.fill() would be the execution of the drawing operation that was performed by the drawMatchSimple, however, it internally would call drawBox or drawBeizierBox which would force a ctx.fill()

this would cause trouble when the canvas had not yet initialized a fillStyle

this PR fixes a number of things

  1. restores the assumption that the drawMatchSimple execution of the drawing operation is done by the callback
  2. makes sure that fillStyle is set, unneeded but this improves clarity
  3. renames some variables in the rendering process, unneeded but this improves clarity

@cmdcolin cmdcolin force-pushed the fix_dark_synteny_resize branch from 449a521 to a0dcd7b Compare October 29, 2024 15:53
@cmdcolin
Copy link
Collaborator Author

updated the explainer in the original comment of this PR

@cmdcolin cmdcolin changed the title Fix dark synteny resize Fix dark redraw on selected features after vertical resize of the synteny canvas Oct 29, 2024
@cmdcolin cmdcolin merged commit 03f6b7d into main Oct 29, 2024
4 checks passed
@cmdcolin cmdcolin deleted the fix_dark_synteny_resize branch October 29, 2024 16:10
@cmdcolin cmdcolin added the bug Something isn't working label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resizing synteny view vertically redraws mouseover without clearing screen
1 participant