Skip to content

Commit

Permalink
Merge pull request #5239 from jdpaterson/master
Browse files Browse the repository at this point in the history
Fix hover on mobile and tablet devices for gl3d subplots
  • Loading branch information
archmoj authored Nov 2, 2020
2 parents 0fce11b + 95ca0d9 commit 0d79ea9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"gl-mat4": "^1.2.0",
"gl-mesh3d": "^2.3.1",
"gl-plot2d": "^1.4.5",
"gl-plot3d": "^2.4.6",
"gl-plot3d": "^2.4.7",
"gl-pointcloud2d": "^1.0.3",
"gl-scatter3d": "^1.2.3",
"gl-select-box": "^1.0.4",
Expand Down
12 changes: 6 additions & 6 deletions test/jasmine/tests/gl3d_plot_interact_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,15 +941,15 @@ describe('Test gl3d drag and wheel interactions', function() {
var sceneTarget;
var relayoutCallback = jasmine.createSpy('relayoutCallback');

function assertEvent(e) {
expect(e.defaultPrevented).toEqual(true);
function assertEvent(e, passive) {
expect(e.defaultPrevented).not.toEqual(passive);
relayoutCallback();
}

gd.addEventListener('touchend', assertEvent);
gd.addEventListener('touchstart', assertEvent);
gd.addEventListener('touchmove', assertEvent);
gd.addEventListener('wheel', assertEvent);
gd.addEventListener('touchend', function(e) { assertEvent(e, true); });
gd.addEventListener('touchstart', function(e) { assertEvent(e, true); });
gd.addEventListener('touchmove', function(e) { assertEvent(e, false); });
gd.addEventListener('wheel', function(e) { assertEvent(e, false); });

Plotly.plot(gd, mock)
.then(function() {
Expand Down

0 comments on commit 0d79ea9

Please sign in to comment.