update: use getNodes in minimap instead of directly accessing nodes state val
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -49,7 +49,7 @@ const viewBB = computed(() => ({
|
|||||||
height: store.dimensions.height / store.transform[2],
|
height: store.dimensions.height / store.transform[2],
|
||||||
}))
|
}))
|
||||||
const viewBox = computed(() => {
|
const viewBox = computed(() => {
|
||||||
const boundingRect = store.nodes && store.nodes.length ? getBoundsofRects(bb.value, viewBB.value) : viewBB.value
|
const boundingRect = store.getNodes && store.getNodes.length ? getBoundsofRects(bb.value, viewBB.value) : viewBB.value
|
||||||
const scaledWidth = boundingRect.width / elementWidth
|
const scaledWidth = boundingRect.width / elementWidth
|
||||||
const scaledHeight = boundingRect.height / elementHeight
|
const scaledHeight = boundingRect.height / elementHeight
|
||||||
const viewScale = Math.max(scaledWidth, scaledHeight)
|
const viewScale = Math.max(scaledWidth, scaledHeight)
|
||||||
@@ -93,8 +93,8 @@ export default {
|
|||||||
>
|
>
|
||||||
<template v-for="node of store.getNodes" :key="`mini-map-node-${node.id}`">
|
<template v-for="node of store.getNodes" :key="`mini-map-node-${node.id}`">
|
||||||
<slot
|
<slot
|
||||||
:x="node.__vf.position.x"
|
:x="node.position.x"
|
||||||
:y="node.__vf.position.y"
|
:y="node.position.y"
|
||||||
:width="node.__vf.width"
|
:width="node.__vf.width"
|
||||||
:height="node.__vf.height"
|
:height="node.__vf.height"
|
||||||
:style="node.style"
|
:style="node.style"
|
||||||
@@ -106,8 +106,8 @@ export default {
|
|||||||
:shape-rendering="shapeRendering"
|
:shape-rendering="shapeRendering"
|
||||||
>
|
>
|
||||||
<MiniMapNode
|
<MiniMapNode
|
||||||
:x="node.__vf.position.x"
|
:x="node.position.x"
|
||||||
:y="node.__vf.position.y"
|
:y="node.position.y"
|
||||||
:width="node.__vf.width"
|
:width="node.__vf.width"
|
||||||
:height="node.__vf.height"
|
:height="node.__vf.height"
|
||||||
:style="node.style"
|
:style="node.style"
|
||||||
|
|||||||
Reference in New Issue
Block a user