File tree 1 file changed +4
-6
lines changed
docs/componentsguide/interactions/dragbox
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import VectorSourceDemo1 from "@demos/VectorSourceDemo1.vue"
22
22
## Usage
23
23
24
24
| Plugin Usage | Explicit Import |
25
- | -------------------------- | :-----------------------------------: |
25
+ | ---------------------------- | :-------------------------------------: |
26
26
| ` <ol-interaction-dragbox> ` | ` <Interactions.OlInteractionDragbox> ` |
27
27
28
28
::: code-group
@@ -65,20 +65,18 @@ To access the source, you can use a `ref()` as shown below:
65
65
``` vue
66
66
<template>
67
67
<!-- ... -->
68
- <ol-map ref="mapRef" @error="handleEvent">
69
- <!-- ... -->
70
- </ol-map>
68
+ <ol-interaction-dragbox ref="dragboxRef" @error="handleEvent" />
71
69
<!-- ... -->
72
70
</template>
73
71
74
72
<script setup lang="ts">
75
73
import { ref, onMounted } from "vue";
76
74
import type DragBox from "ol/interaction/DragBox";
77
75
78
- const drgboxRef = ref<{ dragbox: DragBox } | null>(null);
76
+ const dragboxRef = ref<{ dragbox: DragBox } | null>(null);
79
77
80
78
onMounted(() => {
81
- const dragbox: DragBox = drgboxRef .value?.dragbox;
79
+ const dragbox: DragBox = dragboxRef .value?.dragbox;
82
80
// call your method on `dragbox`
83
81
});
84
82
</script>
You can’t perform that action at this time.
0 commit comments