chore(docs): cleanup intro
This commit is contained in:
@@ -56,7 +56,7 @@ const initialEdges = [
|
||||
style: { strokeWidth: 4, stroke: '#0ea5e9' },
|
||||
},
|
||||
]
|
||||
const { getNodes, findNode, setEdges, updateNodeInternals, dimensions, onNodesInitialized } = useVueFlow({
|
||||
const { getNodes, findNode, setEdges, updateNodeInternals, dimensions, onPaneReady } = useVueFlow({
|
||||
nodes: [
|
||||
{ id: 'intro', type: 'box', position: { x: 0, y: 0 } },
|
||||
{ id: 'examples', type: 'box', position: { x: -50, y: 400 } },
|
||||
@@ -75,8 +75,7 @@ const { getNodes, findNode, setEdges, updateNodeInternals, dimensions, onNodesIn
|
||||
|
||||
const el = templateRef<HTMLDivElement>('el', null)
|
||||
|
||||
const setElements = useDebounceFn(
|
||||
() => {
|
||||
const setElements = useDebounceFn(() => {
|
||||
const offsetX = dimensions.value.width / 2
|
||||
const offsetY = dimensions.value.height / 4
|
||||
|
||||
@@ -176,15 +175,11 @@ const setElements = useDebounceFn(
|
||||
nextTick(() => {
|
||||
updateNodeInternals()
|
||||
})
|
||||
},
|
||||
() => (currentBreakpoint.value === null ? 5 : 50),
|
||||
)
|
||||
|
||||
onNodesInitialized(() => {
|
||||
setElements()
|
||||
})
|
||||
}, 1)
|
||||
|
||||
onMounted(() => {
|
||||
useResizeObserver(el, setElements)
|
||||
})
|
||||
|
||||
function scrollTo() {
|
||||
const el = document.getElementById('acknowledgement')
|
||||
|
||||
Reference in New Issue
Block a user