[perf] do not send event on mouse down unless shift is held
This is Google chart specific.
On mouse down, we used to emit an event. This hid the tooltip, but
not in a correct manner - you can put the mouse over the selected
point and the tooltip would reappear.
This change makes it so that the user is required to click close.
By doing so selections on both the chart and the plot summary
are reset correctly.
When the tooltip is selected, meaning it's focused the user can
hold shift to figure out the delta.
Change-Id: I9fcb40448801f1d00939c9f6e6d8aa3d523da0f9
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/931780
Auto-Submit: Jeff Yoon <jeffyoon@google.com>
Commit-Queue: Ashwin Verleker <ashwinpv@google.com>
Reviewed-by: Ashwin Verleker <ashwinpv@google.com>
diff --git a/perf/modules/plot-google-chart-sk/plot-google-chart-sk.ts b/perf/modules/plot-google-chart-sk/plot-google-chart-sk.ts
index fcc6b2f..11f5602 100644
--- a/perf/modules/plot-google-chart-sk/plot-google-chart-sk.ts
+++ b/perf/modules/plot-google-chart-sk/plot-google-chart-sk.ts
@@ -384,21 +384,6 @@
}
private onChartMouseDown(e: MouseEvent) {
- // This interaction is tricky. When the tooltip is selected
- // when should the tooltip disappear?
- // One potential user journey is that a user might click on an anomaly
- // and then try to shift click around it to estimate the size of the anomaly.
- // While having the tooltip is helpful, other indicators should help users
- // locate the anomaly they were targeting.
- // We dispatch this event as if the tooltip were a popover.
- this.dispatchEvent(
- new CustomEvent('plot-chart-mousedown', {
- bubbles: true,
- composed: true,
- detail: {},
- })
- );
-
// if user holds down shift-click, enable delta range calculation
if (e.shiftKey) {
e.preventDefault(); // disable system events