Fixup svg-dom-arrows in dev env
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import svgdomarrows from 'svg-dom-arrows'
|
import { LinePath as svgdomarrowsLinePath } from 'svg-dom-arrows'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
tree: ItemTree
|
tree: ItemTree
|
||||||
@@ -20,7 +20,7 @@ for (const item of items.value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const start: Ref<Element | null> = useTemplateRef('start')
|
const start: Ref<Element | null> = useTemplateRef('start')
|
||||||
const arrows: Array<svgdomarrows.LinePath> = []
|
const arrows: Array<svgdomarrowsLinePath> = []
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
refreshArrows()
|
refreshArrows()
|
||||||
@@ -49,7 +49,7 @@ function drawArrow(start: Element, end: Element) {
|
|||||||
// console.log("drawArrow(", start, ", ", end, ")")
|
// console.log("drawArrow(", start, ", ", end, ")")
|
||||||
if (start == null || end == null) return
|
if (start == null || end == null) return
|
||||||
|
|
||||||
const arrow = new svgdomarrows.LinePath({
|
const arrow = new svgdomarrowsLinePath({
|
||||||
start: {
|
start: {
|
||||||
element: start,
|
element: start,
|
||||||
position: {
|
position: {
|
||||||
|
|||||||
Reference in New Issue
Block a user