This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@braks/vue-flow-pathfinding-edge
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

Vue Flow Pathfinding Edge 🧲

Custom edge that avoids crossing nodes

🛠 Setup

# install
$ yarn add @braks/vue-flow-pathfinding-edge

# or
$ npm i --save @braks/vue-flow-pathfinding-edge

🎮 Quickstart

<script setup>
import { VueFlow, useVueFlow } from '@braks/vue-flow'
import { PathFindingEdge } from '@braks/vue-flow-pathfinding-edge'
import initialElements from './initial-elements'

const elements = ref(initialElements)

// create a new context so we can fetch nodes
const { getNodes } = useVueFlow()
</script>
<template>
  <div style="height: 300px">
    <VueFlow v-model="elements">
      <template #edge-pathfinding="props">
        <PathFindingEdge v-bind="props" :nodes="getNodes" />
      </template>
    </VueFlow>
  </div>
</template>
// initial-elements.js
export default [
  {
    id: '1',
    label: 'Node 1',
    position: {
      x: 430,
      y: 0,
    },
  },
  {
    id: '2',
    label: 'Node 2',
    position: {
      x: 230,
      y: 90,
    },
  },
  {
    id: 'e12',
    source: '1',
    target: '2',
    label: 'Smart Edge',
    style: { stroke: 'red' },
    // assign pathfinding edge type
    type: 'pathfinding'
  },
]

Readme

Keywords

none

Package Sidebar

Install

npm i @braks/vue-flow-pathfinding-edge

Weekly Downloads

1

Version

0.2.2

License

MIT

Unpacked Size

681 kB

Total Files

17

Last publish

Collaborators

  • braks