12 lines
388 B
TypeScript
12 lines
388 B
TypeScript
import useStore from './useStore'
|
|
import { ElementId, UpdateNodeInternals } from '~/types'
|
|
|
|
export default (store = useStore()): UpdateNodeInternals =>
|
|
(id: ElementId) => {
|
|
const nodeElement: HTMLDivElement | null = document.querySelector(`.vue-flow__node[data-id="${id}"]`)
|
|
|
|
if (nodeElement) {
|
|
store.updateNodeDimensions({ id, nodeElement, forceUpdate: true })
|
|
}
|
|
}
|