diff --git a/package-lock.json b/package-lock.json
index 707e385..9c8a5df 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,13 +11,15 @@
"openseadragon": "^5.0.1",
"pinia": "^2.2.6",
"vue": "^3.5.13",
- "vue-router": "^4.4.5"
+ "vue-router": "^4.4.5",
+ "vuedraggable": "^4.1.0"
},
"devDependencies": {
"@playwright/test": "^1.49.0",
"@tsconfig/node22": "^22.0.0",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.9.3",
+ "@types/openseadragon": "^3.0.10",
"@vitejs/plugin-vue": "^5.2.1",
"@vitest/eslint-plugin": "1.1.10",
"@vue/eslint-config-prettier": "^10.1.0",
@@ -1622,6 +1624,12 @@
"undici-types": "~6.20.0"
}
},
+ "node_modules/@types/openseadragon": {
+ "version": "3.0.10",
+ "resolved": "https://registry.npmjs.org/@types/openseadragon/-/openseadragon-3.0.10.tgz",
+ "integrity": "sha512-nNVlu9PUNDVTudkSqVWhHtghCsyzQrJObEtN5zsVN2ghh5HYAC6U6xAcT9NQRfVfZVZkWXEYp2Hw7hQgwRxqgg==",
+ "dev": true
+ },
"node_modules/@types/tough-cookie": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz",
@@ -5738,6 +5746,11 @@
"node": ">=18"
}
},
+ "node_modules/sortablejs": {
+ "version": "1.14.0",
+ "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.14.0.tgz",
+ "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w=="
+ },
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
@@ -7718,6 +7731,17 @@
"typescript": ">=5.0.0"
}
},
+ "node_modules/vuedraggable": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-4.1.0.tgz",
+ "integrity": "sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==",
+ "dependencies": {
+ "sortablejs": "1.14.0"
+ },
+ "peerDependencies": {
+ "vue": "^3.0.1"
+ }
+ },
"node_modules/w3c-xmlserializer": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz",
diff --git a/package.json b/package.json
index f344f08..ef9ca0a 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"private": true,
"type": "module",
"scripts": {
- "dev": "vite",
+ "dev": "vite --host",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"test:unit": "vitest",
@@ -18,13 +18,15 @@
"openseadragon": "^5.0.1",
"pinia": "^2.2.6",
"vue": "^3.5.13",
- "vue-router": "^4.4.5"
+ "vue-router": "^4.4.5",
+ "vuedraggable": "^4.1.0"
},
"devDependencies": {
"@playwright/test": "^1.49.0",
"@tsconfig/node22": "^22.0.0",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.9.3",
+ "@types/openseadragon": "^3.0.10",
"@vitejs/plugin-vue": "^5.2.1",
"@vitest/eslint-plugin": "1.1.10",
"@vue/eslint-config-prettier": "^10.1.0",
diff --git a/src/App.vue b/src/App.vue
index 1a046fb..816adea 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -2,7 +2,7 @@
@@ -19,7 +19,8 @@ import Vignemale from '../public/deepzoom/vignemale/dz/info.json'
const Cells = 'https://verrochi92.github.io/axolotl/data/W255B_0.dzi'
import ZoomRect from './components/tools/ZoomRect.vue'
-import ZoomPoint from './components/tools/ZoomPoint.vue'
+import StoryEditor from './components/tools/StoryEditor.vue'
+import TestSortable from './components/tools/TestSortable.vue'
const Viewer = ref()
const openSeadragonElt = ref()
@@ -31,16 +32,20 @@ const initViewer = () => {
element: openSeadragonElt.value,
animationTime: 0.4,
prefixUrl: 'https://openseadragon.github.io/openseadragon/images/',
- showNavigator: true,
- sequenceMode: true,
+ showNavigator: false,
+ sequenceMode: false,
tileSources: Poulpatore,
- showNavigationControl: true,
+ showNavigationControl: false,
drawer: 'canvas',
preventDefaultAction: true,
- homeFillsViewer: true,
visibilityRatio: 1,
crossOriginPolicy: 'Anonymous',
- showZoomControl: true,
+ gestureSettingsMouse: {
+ scrollToZoom: true,
+ clickToZoom: false,
+ dblClickToZoom: true,
+ dragToPan: true,
+ },
})
}
diff --git a/src/assets/story.json b/src/assets/story.json
index 774f2cf..d631155 100644
--- a/src/assets/story.json
+++ b/src/assets/story.json
@@ -5,28 +5,34 @@
"url": "https://verrochi92.github.io/axolotl/data/W255B_0.dzi",
"markers": [
{
+ "id": 0,
+ "name": "first",
"order": 0,
"position": {
- "x": 0.2,
- "y": 0.2
+ "x": 0.6,
+ "y": 0.7
},
"zoom": 4,
"annotation": "lorem ipsum dolor sit amet"
},
{
+ "id": 1,
+ "name": "second",
"order": 1,
"position": {
- "x": 0.2,
+ "x": 0.68,
"y": 0.3
},
- "zoom": 3,
+ "zoom": 8,
"annotation": "second annotation"
},
{
+ "id": 2,
+ "name": "third",
"order": 2,
"position": {
- "x": 0.1,
- "y": 0.1
+ "x": 0.5,
+ "y": 0.2
},
"zoom": 7,
"annotation": "third"
diff --git a/src/components/StoryList.vue b/src/components/StoryList.vue
new file mode 100644
index 0000000..e69de29
diff --git a/src/components/tools/StoryEditor.md b/src/components/tools/StoryEditor.md
new file mode 100644
index 0000000..f3bfeb1
--- /dev/null
+++ b/src/components/tools/StoryEditor.md
@@ -0,0 +1,17 @@
+# Story Editor
+
+## Props:
+
+story: Story (should be a state as Markers are CRUD ?)
+
+## Ref:
+
+selectedMarker: Marker
+
+## Methods:
+
+LoadStory
+CreateMarker
+SelectMarker
+EditMarker
+DeleteMarker
diff --git a/src/components/tools/StoryEditor.vue b/src/components/tools/StoryEditor.vue
new file mode 100644
index 0000000..5b89673
--- /dev/null
+++ b/src/components/tools/StoryEditor.vue
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
diff --git a/src/components/tools/StoryPlayer.vue b/src/components/tools/StoryPlayer.vue
new file mode 100644
index 0000000..1d7e0fe
--- /dev/null
+++ b/src/components/tools/StoryPlayer.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
diff --git a/src/components/tools/TestSortable.vue b/src/components/tools/TestSortable.vue
new file mode 100644
index 0000000..531547a
--- /dev/null
+++ b/src/components/tools/TestSortable.vue
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/tools/ZoomPoint.vue b/src/components/tools/ZoomPoint.vue
deleted file mode 100644
index 1cb000b..0000000
--- a/src/components/tools/ZoomPoint.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
diff --git a/src/types/virages.d.ts b/src/types/virages.d.ts
index d02b653..e938421 100644
--- a/src/types/virages.d.ts
+++ b/src/types/virages.d.ts
@@ -1,5 +1,7 @@
export interface Marker {
+ id: number
order: number
+ name: string
position: OpenSeadragon.Point
zoom: number
annotation: string
diff --git a/vite.config.ts b/vite.config.ts
index 4217010..036ca4d 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -6,13 +6,10 @@ import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
export default defineConfig({
- plugins: [
- vue(),
- vueDevTools(),
- ],
+ plugins: [vue(), vueDevTools()],
resolve: {
alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
+ '@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
})