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

misc(treemap): esc to zoom out #12498

Merged
merged 1 commit into from
May 18, 2021
Merged

misc(treemap): esc to zoom out #12498

merged 1 commit into from
May 18, 2021

Conversation

paulirish
Copy link
Member

@paulirish paulirish commented May 18, 2021

as suggested by brendan

(keypress doesn't catch Escape, but keyup does.)

ref #11254

@paulirish paulirish requested a review from a team as a code owner May 18, 2021 00:41
@paulirish paulirish requested review from patrickhulce and removed request for a team May 18, 2021 00:41
@google-cla google-cla bot added the cla: yes label May 18, 2021
if (!(e instanceof KeyboardEvent)) return;

if (e.key === 'Enter') this.updateColors();

if (e.key === 'Escape' && this.treemap) {
this.treemap.zoom([]); // zoom out to root
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there potential for this have the same recoloring problem (#12496 (comment))? do we need to flip the order to ensure these are recolored? From what I could tell poking around devtools it seemed like the other nodes were just hidden and still there, so not an issue, but calling it out in case it was just oversight.

Copy link
Collaborator

Choose a reason for hiding this comment

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

played around with it. zoomed into a node, changed view mode with keyboard, zoomed out with ESC. things were colored correctly.

@connorjclark connorjclark mentioned this pull request May 18, 2021
24 tasks
@connorjclark connorjclark merged commit 76e2189 into master May 18, 2021
@connorjclark connorjclark deleted the treemap-esc branch May 18, 2021 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants