Skip to content

Commit 8aa64a8

Browse files
mromanelli9Marco Romanelli
andauthored
projector: fix controls help dialog button (#6024)
## Motivation for features / changes On the embeddings projector, on the top left corner of the scatter plot there's an help icon (with a question mark) that when clicked should open a dialog showing an help for the controls in 3D and 2D mode. Currently the icon doesn't work and if clicked nothing happens. ## Technical description of changes Set a custom function on the `on-click` event of the `paper-icon-button`. ## Detailed steps to verify changes work correctly (as executed by you) - Open the embeddings projector - Click on the help icon (question mark, tooltip "Help with interaction control") - The help dialog should appear at the center of the page Co-authored-by: Marco Romanelli <[email protected]>
1 parent 44ea05e commit 8aa64a8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tensorboard/plugins/projector/vz_projector/vz-projector.html.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export const template = html`
358358
></vz-projector-metadata-card>
359359
<paper-icon-button
360360
raised
361-
onclick="help3dDialog.open()"
361+
on-click="_toggleHelp3dDialog"
362362
icon="help-outline"
363363
id="help-3d-icon"
364364
></paper-icon-button>

tensorboard/plugins/projector/vz_projector/vz-projector.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,4 +704,9 @@ class Projector
704704
}
705705
this.notifySelectionChanged(state.selectedPoints);
706706
}
707+
708+
_toggleHelp3dDialog(event: MouseEvent) {
709+
event.preventDefault();
710+
(this.$$('#help3dDialog') as any).open();
711+
}
707712
}

0 commit comments

Comments
 (0)