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

zooming on interactive plot with track-pad not working on windows #2424

Open
1 of 2 tasks
albe-jj opened this issue Nov 20, 2024 · 0 comments
Open
1 of 2 tasks

zooming on interactive plot with track-pad not working on windows #2424

albe-jj opened this issue Nov 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@albe-jj
Copy link

albe-jj commented Nov 20, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

With the following interactive plot I cannot zoom in with the track-pad on windows. Zoom in with the mouse wheel works well.

Expected Behavior

I should be able to zoom in with the track-pad.

Steps with code example to reproduce

Steps with code example to reproduce
  InAppWebViewSettings settings = InAppWebViewSettings(
    mediaPlaybackRequiresUserGesture: false,
    allowsInlineMediaPlayback: true,
    iframeAllow: "camera; microphone",
    iframeAllowFullscreen: true,
    useOnLoadResource: true,
    useShouldOverrideUrlLoading: true,
    allowsBackForwardNavigationGestures: true,
    scrollMultiplier: 1,
  );

the interactive plot html code:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bokeh Plot</title>
    <style>
      html, body {
        box-sizing: border-box;
        height: 100%;
        margin: 0;
        padding: 0;
      }
    </style>
    <script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-3.1.0.min.js"></script>
    <script type="text/javascript">
        Bokeh.set_log_level("info");
    </script>
  </head>
  <body>
    <div id="f51afd3d-72f3-4292-9b9b-95295add4f5a" data-root-id="p1128" style="display: contents;"></div>
  
    <script type="application/json" id="p1257">
      {"e91e631c-e1f0-4cd3-8907-4f155d1fc643":{"version":"3.1.0","title":"Bokeh Application","defs":[],"roots":[{"type":"object","name":"Figure","id":"p1128","attributes":{"x_range":{"type":"object","name":"DataRange1d","id":"p1130"},"y_range":{"type":"object","name":"DataRange1d","id":"p1129"},"x_scale":{"type":"object","name":"LinearScale","id":"p1142"},"y_scale":{"type":"object","name":"LinearScale","id":"p1144"},"title":{"type":"object","name":"Title","id":"p1131","attributes":{"text":"Simple Line Plot"}},"renderers":[{"type":"object","name":"GlyphRenderer","id":"p1181","attributes":{"data_source":{"type":"object","name":"ColumnDataSource","id":"p1175","attributes":{"selected":{"type":"object","name":"Selection","id":"p1176","attributes":{"indices":[],"line_indices":[]}},"selection_policy":{"type":"object","name":"UnionRenderers","id":"p1177"},"data":{"type":"map","entries":[["x",[1,2,3,4]],["y",[4,7,2,5]]]}}},"view":{"type":"object","name":"CDSView","id":"p1182","attributes":{"filter":{"type":"object","name":"AllIndices","id":"p1183"}}},"glyph":{"type":"object","name":"Line","id":"p1178","attributes":{"x":{"type":"field","field":"x"},"y":{"type":"field","field":"y"},"line_color":"#1f77b4","line_width":2}},"nonselection_glyph":{"type":"object","name":"Line","id":"p1179","attributes":{"x":{"type":"field","field":"x"},"y":{"type":"field","field":"y"},"line_color":"#1f77b4","line_alpha":0.1,"line_width":2}},"muted_glyph":{"type":"object","name":"Line","id":"p1180","attributes":{"x":{"type":"field","field":"x"},"y":{"type":"field","field":"y"},"line_color":"#1f77b4","line_alpha":0.2,"line_width":2}}}}],"toolbar":{"type":"object","name":"Toolbar","id":"p1137","attributes":{"tools":[{"type":"object","name":"PanTool","id":"p1160"},{"type":"object","name":"WheelZoomTool","id":"p1161"},{"type":"object","name":"BoxZoomTool","id":"p1162","attributes":{"overlay":{"type":"object","name":"BoxAnnotation","id":"p1163","attributes":{"syncable":false,"level":"overlay","visible":false,"left_units":"canvas","right_units":"canvas","bottom_units":"canvas","top_units":"canvas","line_color":"black","line_alpha":1.0,"line_width":2,"line_dash":[4,4],"fill_color":"lightgrey","fill_alpha":0.5}}}},{"type":"object","name":"SaveTool","id":"p1164"},{"type":"object","name":"ResetTool","id":"p1165"},{"type":"object","name":"HelpTool","id":"p1166"},{"type":"object","name":"WheelZoomTool","id":"p1186"}],"active_scroll":{"id":"p1186"}}},"left":[{"type":"object","name":"LinearAxis","id":"p1153","attributes":{"ticker":{"type":"object","name":"BasicTicker","id":"p1156","attributes":{"mantissas":[1,2,5]}},"formatter":{"type":"object","name":"BasicTickFormatter","id":"p1154"},"axis_label":"y","major_label_policy":{"type":"object","name":"AllLabels","id":"p1155"}}}],"below":[{"type":"object","name":"LinearAxis","id":"p1146","attributes":{"ticker":{"type":"object","name":"BasicTicker","id":"p1149","attributes":{"mantissas":[1,2,5]}},"formatter":{"type":"object","name":"BasicTickFormatter","id":"p1147"},"axis_label":"x","major_label_policy":{"type":"object","name":"AllLabels","id":"p1148"}}}],"center":[{"type":"object","name":"Grid","id":"p1152","attributes":{"axis":{"id":"p1146"}}},{"type":"object","name":"Grid","id":"p1159","attributes":{"dimension":1,"axis":{"id":"p1153"}}},{"type":"object","name":"Legend","id":"p1184","attributes":{"items":[{"type":"object","name":"LegendItem","id":"p1185","attributes":{"label":{"type":"value","value":"Test"},"renderers":[{"id":"p1181"}]}}]}}]}}],"callbacks":{"type":"map"}}}
    </script>
    <script type="text/javascript">
      (function() {
        const fn = function() {
          Bokeh.safely(function() {
            (function(root) {
              function embed_document(root) {
              const docs_json = document.getElementById('p1257').textContent;
              const render_items = [{"docid":"e91e631c-e1f0-4cd3-8907-4f155d1fc643","roots":{"p1128":"f51afd3d-72f3-4292-9b9b-95295add4f5a"},"root_ids":["p1128"]}];
              root.Bokeh.embed.embed_items(docs_json, render_items);
              }
              if (root.Bokeh !== undefined) {
                embed_document(root);
              } else {
                let attempts = 0;
                const timer = setInterval(function(root) {
                  if (root.Bokeh !== undefined) {
                    clearInterval(timer);
                    embed_document(root);
                  } else {
                    attempts++;
                    if (attempts > 100) {
                      clearInterval(timer);
                      console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing");
                    }
                  }
                }, 10, root)
              }
            })(window);
          });
        };
        if (document.readyState != "loading") fn();
        else document.addEventListener("DOMContentLoaded", fn);
      })();
    </script>
  </body>
</html>

Stacktrace/Logs

Stacktrace/Logs

No error is raised.

Flutter version

3.24.4

Operating System, Device-specific and/or Tool

windows 10

Plugin version

6.2.0-beta.1

Additional information

No response

Self grab

  • I'm ready to work on this issue!
@albe-jj albe-jj added the bug Something isn't working label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant