-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
misc(treemap): highlight treemap node on mouse hover table row #12483
Conversation
@@ -78,6 +78,8 @@ class TreemapViewer { | |||
this.viewModes; | |||
/** @type {RenderState=} */ | |||
this.previousRenderState; | |||
/** @type {WeakMap<HTMLElement, LH.Treemap.Node>} */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, why a WeakMap
if it's recreated with every new version of the table? To me it still signals something special is going on so be careful while reading, but it's probably actually a good default to use when you don't need to iterate and perf isn't a big concern...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to different bundle selector values re-creating the table, scrolling also recreates rows. They are all lazily rendered. So it's good that scrolling doesn't eventually result in OOM (after n months or whatever) :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also agree it's just a good default
ref #11254