Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions draftlogs/7474_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix scroll wheel zoom for choropleth maps in Safari [#7474](https://github.com/plotly/plotly.js/pull/7474)
28 changes: 16 additions & 12 deletions package-lock.json

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

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,10 @@
"transform-loader": "^0.2.4",
"true-case-path": "^2.2.1",
"virtual-webgl": "^1.0.6"
},
"overrides": {
"falafel": {
"acorn": "^8.1.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel comfortable introducing overriding dependencies like that in this PR, specially if we want to release a patch.
IMHO This should be discussed in a separate PR.
I suggest we use bring back the if statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I'll put back the if statement for now and open a separate PR for discussing upgrading acorn.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@archmoj @camdecoster I have opened #7478 regarding the acorn override

}
}
}
}
8 changes: 8 additions & 0 deletions src/lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ var Events = {
internalEv.emit(event, data);
};

/*
* Add a dummy event handler for 'wheel' event for Safari
* to enable mouse wheel zoom.
* https://github.com/d3/d3/issues/3035
* https://github.com/plotly/plotly.js/issues/7452
*/
plotObj?.addEventListener?.("wheel", () => {});

return plotObj;
},

Expand Down