Macro: #3601 - attachment points aren't disappearing in snake viewed chain of peptides when hovering them multiple times #3628
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How the feature works? / How did you fix the issue?
(Screenshots, videos, or GIFs, if applicable)
Root cause: When mouse over the current attachment points, they will be destoryed in a settimeout function and new set of attachment points will be created. If current attachment points are destoryed after their mouseleave event be triggered then there is no issue because the mouseleave event will trigger actions to clear the new created attachment points, while if they are destoryed before its mouseleave event be triggered(because the execution time of the settimeout function couldn't be guaranteed) then the new created set of attachment points will be left in the view.
Solution: instead of creating new attachment points everytime their mouseover event listener triggered, just update their styles when there are already attachment points existing.
Check list
#1234 – issue name