Skip to content

Commit

Permalink
Add no-scroll property to disable scrolling on tracks if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Swaathik committed Dec 8, 2023
1 parent cb0b723 commit 68f4d7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/protvista-zoomable/src/protvista-zoomable.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ class ProtvistaZoomable extends HTMLElement {
])
.filter(() => {
if (!(d3Event instanceof WheelEvent)) return true;
if (this.hasAttribute("scroll-filter")) {
if (this.hasAttribute("no-scroll")) {
return false;
}
if (this.hasAttribute("filter-scroll")) {
const scrollableAttribute = this.getAttribute("scrollable");
if (scrollableAttribute) return scrollableAttribute === "true";
}
Expand Down

0 comments on commit 68f4d7e

Please sign in to comment.