Skip to content

misc(treemap): esc to zoom out#12498

Merged
connorjclark merged 1 commit into
masterfrom
treemap-esc
May 18, 2021
Merged

misc(treemap): esc to zoom out#12498
connorjclark merged 1 commit into
masterfrom
treemap-esc

Conversation

@paulirish

@paulirish paulirish commented May 18, 2021

Copy link
Copy Markdown
Member

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.key === 'Enter') this.updateColors();

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

Copy link
Copy Markdown
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
Copy Markdown
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