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: improve within link performance by reducing the number of event points #828

Merged
merged 2 commits into from
Nov 26, 2022

Conversation

sehilyi
Copy link
Member

@sehilyi sehilyi commented Nov 26, 2022

Improve withinLink rendering performance by reducing the number of mouse event points. We previously saved more event points than what are displayed. This was, initially, to make the mouse events more fine-grained, but this is not necessary anymore.

@@ -324,13 +324,10 @@ export function drawWithinLink(g: PIXI.Graphics, trackInfo: any, model: GoslingT
: Math.min(xe - x + trackWidth * MIN_HEIGHT, trackWidth) / trackWidth) *
(flipY ? -1 : 1);

if (step % 20 === 0 || step === NUM_STEPS) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This was unnecessary.

@sehilyi sehilyi merged commit 4562bc9 into master Nov 26, 2022
@sehilyi sehilyi deleted the sehilyi/within-link-mouse-event-perfornace branch November 26, 2022 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant