From b1cf6bdf6e99d909647206124549f1e98ec65742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Fa=CC=88=C3=9Fler?= Date: Fri, 15 Nov 2024 14:40:14 +0100 Subject: [PATCH 1/3] refactor: renaming enableWheelOnKey property for better understanding --- docs/src/.vuepress/components/HtmlDemo.vue | 17 ++ .../.vuepress/components/ReactivityDemo.vue | 270 +++++++++++------- docs/src/.vuepress/components/SvgDemo.vue | 21 ++ src/components/ScrollOverlay.vue | 68 ++--- src/components/VueZoomable.vue | 75 +++-- src/composables/useWheel.ts | 49 ++-- src/examples/ReactivityDemo.vue | 270 +++++++++++------- 7 files changed, 486 insertions(+), 284 deletions(-) diff --git a/docs/src/.vuepress/components/HtmlDemo.vue b/docs/src/.vuepress/components/HtmlDemo.vue index 4a852ca..9cb6590 100644 --- a/docs/src/.vuepress/components/HtmlDemo.vue +++ b/docs/src/.vuepress/components/HtmlDemo.vue @@ -46,6 +46,23 @@ :touchEnabled="touchEnabled" :minZoom="0.3" :maxZoom="2" :dblClickZoomStep="0.4" :wheelZoomStep="0.01" :enableControllButton="enableControllButton" :enableWheelOnKey="documentFlow ? 'Control' : undefined" @zoom="showEvent" @panned="showEvent"> +
diff --git a/docs/src/.vuepress/components/ReactivityDemo.vue b/docs/src/.vuepress/components/ReactivityDemo.vue index 9cc0b7c..a2c2a42 100644 --- a/docs/src/.vuepress/components/ReactivityDemo.vue +++ b/docs/src/.vuepress/components/ReactivityDemo.vue @@ -1,33 +1,40 @@ - @@ -277,12 +343,12 @@ let enableControllButton = ref(true); flex-direction: column; } -#zoomable-content>div { +#zoomable-content > div { display: flex; flex-direction: row; } -#zoomable-content>div>div { +#zoomable-content > div > div { margin: 50px; background-color: blue; height: 100px; From 2f5b40fd5898412c911aba959bfe4dc38c39d104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Fa=CC=88=C3=9Fler?= Date: Fri, 15 Nov 2024 14:40:35 +0100 Subject: [PATCH 2/3] refactor: use ScrollOverlay inside VueZoomable component --- src/components/VueZoomable.vue | 60 ++++++++++++++-------------------- 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/src/components/VueZoomable.vue b/src/components/VueZoomable.vue index 4d549c1..f949a90 100644 --- a/src/components/VueZoomable.vue +++ b/src/components/VueZoomable.vue @@ -1,28 +1,30 @@