update: pass store state as props to edge-renderer and edge

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-22 13:40:25 +01:00
parent ebd0f9e738
commit 2b065b4e56
14 changed files with 152 additions and 143 deletions
+2 -6
View File
@@ -176,10 +176,6 @@ invoke(async () => {
})
const { width, height } = useElementBounding(zoomPaneEl)
store.dimensions = {
width: width.value,
height: height.value,
}
// skip waiting for ssr
const window = useWindow()
@@ -191,7 +187,7 @@ watch(
store.dimensions.width = newWidth
store.dimensions.height = newHeight
},
{ flush: 'pre' },
{ flush: 'sync', immediate: true },
)
watch(
transform,
@@ -201,7 +197,7 @@ watch(
clamp(val.y, store.translateExtent[0][0], store.translateExtent[1][0]),
clamp(val.zoom, store.translateExtent[0][0], store.translateExtent[1][0]),
]),
{ flush: 'pre' },
{ flush: 'sync', immediate: true },
)
</script>
<script lang="ts">