uros-b commented on code in PR #56694:
URL: https://github.com/apache/spark/pull/56694#discussion_r3462640275
##########
sql/core/src/main/resources/org/apache/spark/sql/execution/ui/static/spark-sql-viz.js:
##########
@@ -745,6 +745,11 @@ function setupZoomAndPan(svg, zoomLayer) {
// (foreignObject) so text inside metrics tables remains selectable.
// Also ignore right-click to leave the browser context menu intact.
if (event.button === 2) return false;
+ // Require Ctrl (or Cmd on Mac) for wheel-zoom so that unmodified
+ // scroll gestures pass through to the page for normal scrolling.
+ // Note: trackpad pinch gestures fire as wheel events with ctrlKey=true,
+ // so pinch-to-zoom still works as expected.
+ if (event.type === "wheel" && !event.ctrlKey && !event.metaKey) return
false;
Review Comment:
Please verify - there might be some unreachable code here, which we could
simplify to a single source of truth. The unmodified-wheel rejection is
duplicated: the d3 .filter() rejects wheel && !ctrlKey && !metaKey, AND the
wrapper only forwards Ctrl/Cmd+wheel to d3. Since the wrapper never forwards an
unmodified wheel to d3, the wheel-branch of the .filter() guard is effectively
unreachable for the wheel path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]