Skip to content

Commit 46116e1

Browse files
authored
Fix freeze scroll to only disable scroll wheel while preserving drag functionality (#29)
1 parent 0a3b889 commit 46116e1

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

js/widget.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,8 @@ async function render({ model, el }) {
176176
const zoomEnabled = model.get("enable_zoom");
177177

178178
if (freezeScroll) {
179-
// Disable only scroll and zoom
179+
// Disable only scroll wheel zoom, but keep drag functionality
180180
svg.on("wheel.zoom", null); // Disable scroll wheel zoom
181-
svg.on("mousedown.zoom", null); // Disable zoom on mousedown
182-
svg.on("touchstart.zoom", null); // Disable zoom on touchstart
183-
svg.on("touchmove.zoom", null); // Disable zoom on touchmove
184-
svg.on("touchend.zoom", null); // Disable zoom on touchend
185-
svg.on("touchcancel.zoom", null); // Disable zoom on touchcancel
186181
} else {
187182
// Re-enable zoom if not frozen and zoom is enabled
188183
if (zoomEnabled) {

0 commit comments

Comments
 (0)