chore(nodes): set dimensions after mount
This commit is contained in:
@@ -69,6 +69,8 @@ watch(
|
|||||||
onBeforeUnmount(() => observer.stop())
|
onBeforeUnmount(() => observer.stop())
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
updateNodeDimensions([{ id, nodeElement: nodeElement.value, forceUpdate: true }])
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
[
|
[
|
||||||
() => node.position.x,
|
() => node.position.x,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ onMounted(async () => {
|
|||||||
// hide graph until dimensions are ready, so we don't have jumping graphs (ssr for example)
|
// hide graph until dimensions are ready, so we don't have jumping graphs (ssr for example)
|
||||||
ready = true
|
ready = true
|
||||||
|
|
||||||
fitViewOnInit && fitView()
|
fitViewOnInit?.value && fitView()
|
||||||
emits.paneReady({
|
emits.paneReady({
|
||||||
id,
|
id,
|
||||||
nodes,
|
nodes,
|
||||||
|
|||||||
Reference in New Issue
Block a user