From e746cfb216836e26a6c060558278d724bd3ed5d5 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Sun, 28 Jul 2024 14:36:56 -0700
Subject: Add clear hex contents dialog
---
src/modules/pan-zoom.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'src/modules/pan-zoom.js')
diff --git a/src/modules/pan-zoom.js b/src/modules/pan-zoom.js
index 11471f6..d13c90f 100644
--- a/src/modules/pan-zoom.js
+++ b/src/modules/pan-zoom.js
@@ -14,8 +14,10 @@ function restorePanZoomVal(el) {
function addEventListeners(svg, el) {
svg.addEventListener('wheel', e => zoom(el, e, zoomFactor), { passive: false });
svg.addEventListener('pointerdown', e => {
- e.target.setPointerCapture(e.pointerId);
- pan(svg, el, e), { passive: false };
+ if (e.button === 0) {
+ e.target.setPointerCapture(e.pointerId);
+ pan(svg, el, e), { passive: false };
+ }
});
}
--
cgit v1.2.3