From 4e31702476963dd75f90e08ba59265610811f149 Mon Sep 17 00:00:00 2001 From: Maurice Conrad Date: Sun, 14 Apr 2024 01:07:37 +0200 Subject: [PATCH] fixed bug --- playground/package-lock.json | 25 ++- playground/package.json | 3 +- playground/src/App.vue | 6 +- playground/src/components/NavBar.vue | 49 +++++ playground/src/components/Playground.vue | 2 +- playground/vite.config.ts | 2 +- zoompinch-lit/index.html | 4 + zoompinch-lit/src/components/PanCake.ts | 246 ++++++++++++++++++++++- zoompinch-lit/src/util/helpers.ts | 48 +++++ zoompinch-vue/package.json | 2 +- zoompinch-vue/src/controllers/touch.ts | 5 +- zoompinch-vue/src/controllers/zoom.ts | 2 +- 12 files changed, 374 insertions(+), 20 deletions(-) create mode 100644 playground/src/components/NavBar.vue create mode 100644 zoompinch-lit/src/util/helpers.ts diff --git a/playground/package-lock.json b/playground/package-lock.json index 42b45e2..bc269b5 100644 --- a/playground/package-lock.json +++ b/playground/package-lock.json @@ -8,9 +8,10 @@ "name": "zoompinch-playground", "version": "0.0.0", "dependencies": { + "@vicons/ionicons5": "^0.12.0", "naive-ui": "^2.38.1", "vue": "^3.2.37", - "zoompinch": "^0.0.6" + "zoompinch": "^0.0.5" }, "devDependencies": { "@vitejs/plugin-vue": "^3.1.0", @@ -128,6 +129,11 @@ "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==" }, + "node_modules/@vicons/ionicons5": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@vicons/ionicons5/-/ionicons5-0.12.0.tgz", + "integrity": "sha512-Iy1EUVRpX0WWxeu1VIReR1zsZLMc4fqpt223czR+Rpnrwu7pt46nbnC2ycO7ItI/uqDLJxnbcMC7FujKs9IfFA==" + }, "node_modules/@vitejs/plugin-vue": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-3.2.0.tgz", @@ -1401,9 +1407,9 @@ "dev": true }, "node_modules/zoompinch": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/zoompinch/-/zoompinch-0.0.6.tgz", - "integrity": "sha512-w9ZY9Ysgr7T01Im5hjLDL2k7o8eMsUPZf5YEIqJc1v8kbnVkKlFmTp+0l+/SyLsR+nG/cPJC6EIlMJ8YbVVHbg==", + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/zoompinch/-/zoompinch-0.0.5.tgz", + "integrity": "sha512-1MHcGtWB3tBqRuY3iPFaF+FwXbXsreCXbT40kFhGev+G9YO8pmmpicZ4ls7vx7s+7S+N9s7cIoG4ssL1IE3dRg==", "dependencies": { "@vueuse/core": "^10.9.0" }, @@ -1490,6 +1496,11 @@ "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==" }, + "@vicons/ionicons5": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@vicons/ionicons5/-/ionicons5-0.12.0.tgz", + "integrity": "sha512-Iy1EUVRpX0WWxeu1VIReR1zsZLMc4fqpt223czR+Rpnrwu7pt46nbnC2ycO7ItI/uqDLJxnbcMC7FujKs9IfFA==" + }, "@vitejs/plugin-vue": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-3.2.0.tgz", @@ -2303,9 +2314,9 @@ "dev": true }, "zoompinch": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/zoompinch/-/zoompinch-0.0.6.tgz", - "integrity": "sha512-w9ZY9Ysgr7T01Im5hjLDL2k7o8eMsUPZf5YEIqJc1v8kbnVkKlFmTp+0l+/SyLsR+nG/cPJC6EIlMJ8YbVVHbg==", + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/zoompinch/-/zoompinch-0.0.5.tgz", + "integrity": "sha512-1MHcGtWB3tBqRuY3iPFaF+FwXbXsreCXbT40kFhGev+G9YO8pmmpicZ4ls7vx7s+7S+N9s7cIoG4ssL1IE3dRg==", "requires": { "@vueuse/core": "^10.9.0" } diff --git a/playground/package.json b/playground/package.json index 205bafa..8af67ec 100644 --- a/playground/package.json +++ b/playground/package.json @@ -9,9 +9,10 @@ "preview": "vite preview" }, "dependencies": { + "@vicons/ionicons5": "^0.12.0", "naive-ui": "^2.38.1", "vue": "^3.2.37", - "zoompinch": "^0.0.6" + "zoompinch": "^0.0.5" }, "devDependencies": { "@vitejs/plugin-vue": "^3.1.0", diff --git a/playground/src/App.vue b/playground/src/App.vue index 833e1bc..9a28585 100644 --- a/playground/src/App.vue +++ b/playground/src/App.vue @@ -1,10 +1,12 @@ @@ -13,7 +15,9 @@ import Playground from './components/Playground.vue'; width: 100%; height: 100%; box-sizing: border-box; - padding: 20px; + padding: 0px; + display: grid; + grid-template-rows: auto 1fr; } diff --git a/playground/src/components/NavBar.vue b/playground/src/components/NavBar.vue new file mode 100644 index 0000000..19b6eca --- /dev/null +++ b/playground/src/components/NavBar.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/playground/src/components/Playground.vue b/playground/src/components/Playground.vue index e13fa49..5ccbeb0 100644 --- a/playground/src/components/Playground.vue +++ b/playground/src/components/Playground.vue @@ -132,7 +132,7 @@ :mouse="mouseEvents" :touch="touchEvents" :wheel="wheelEvents" - :gesture="gestureEvents" + :gesture="false" >