From 1b1a809178ecb4e4ae0f2204c441f4c2921b7785 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Sat, 8 Jun 2024 11:17:40 -0700
Subject: WIP: Fix pan-zoom for webkit
---
src/modules/pan-zoom.js | 9 +++++++--
src/modules/record_sheet.js | 2 ++
2 files changed, 9 insertions(+), 2 deletions(-)
(limited to 'src/modules')
diff --git a/src/modules/pan-zoom.js b/src/modules/pan-zoom.js
index 86f6727..3818444 100644
--- a/src/modules/pan-zoom.js
+++ b/src/modules/pan-zoom.js
@@ -12,8 +12,13 @@ function restorePanZoomVal(svg) {
}
function addEventListeners(svg) {
- svg.addEventListener('wheel', e => zoom(svg, e, zoomFactor), { passive: false });
- svg.addEventListener('pointerdown', e => pan(svg, e), { passive: false });
+ // svg.addEventListener('wheel', e => zoom(svg, e, zoomFactor), { passive: false });
+ // svg.addEventListener('pointerdown', e => pan(svg, e), { passive: false });
+
+ const group = svg.querySelector('.gameboard');
+
+ svg.addEventListener('wheel', e => zoom(group, e, zoomFactor), { passive: false });
+ svg.addEventListener('pointerdown', e => pan(svg, group, e), { passive: false });
}
function storePanZoomVal(transformMatrix) {
diff --git a/src/modules/record_sheet.js b/src/modules/record_sheet.js
index f786112..132a7dd 100644
--- a/src/modules/record_sheet.js
+++ b/src/modules/record_sheet.js
@@ -194,6 +194,8 @@ export function start(startLoc, units) {
Observable.subscribe('select', select);
Observable.subscribe('endmove', endMove);
+
+ console.log('records created');
}
export function stop() {
--
cgit v1.2.3