Git Product home page Git Product logo

bcakmakoglu / vue-flow Goto Github PK

View Code? Open in Web Editor NEW
2.9K 27.0 196.0 15.11 MB

A highly customizable Flowchart component for Vue 3. Features seamless zoom & pan ๐Ÿ”Ž, additional components like a Minimap ๐Ÿ—บ and utilities to interact with state and graph.

Home Page: https://vueflow.dev/

License: MIT License

JavaScript 0.74% TypeScript 79.05% CSS 1.92% Vue 17.95% Dockerfile 0.21% HTML 0.12%
vue vue3 flowchart typescript javascript diagrams flow turborepo vite vitepress

vue-flow's Introduction

Vue Flow ๐ŸŒŠ

Vue flow top-language GitHub code size in bytes GitHub last commit

Vue Flow: A highly customizable Vue 3 Flowchart component.

Vue Flow is a bridge to the world of interactive flowcharts and graphs, empowering you to bring interactivity to your graphic representations. Whether it's crafting personal diagrams, generating dynamic editors, or anything else your imagination conjures up, Vue Flow has you covered.

You can find a detailed explanation on how to get started here or jump right into the examples.

Table of contents

โญ๏ธ Features

  • ๐Ÿ‘ถ Easy setup: Get started hassle-free - Built-in zoom- & pan features, element dragging, selection and much more

  • ๐ŸŽจ Customizable: Use your custom nodes, edges and connection lines and expand on Vue Flows' functionality

  • ๐Ÿš€ Fast: Tracks changes reactively and only re-renders the appropriate elements

  • ๐Ÿงฒ Utils & Composition: Comes with graph helper and state composable functions for advanced uses

  • ๐Ÿ“ฆ Additional Components:

    • ๐Ÿ–ผ Background: With two built-in patterns and some configuration options like height, width or color.

    • ๐Ÿงญ Minimap: Shows current nodes in a small map shape in the bottom right corner

    • ๐Ÿ•น Controls: Control zoom behavior from a panel on the bottom left

    • ๐Ÿค– And (many) more to come...

  • ๐Ÿฆพ Reliable: Fully written in TypeScript

๐Ÿ›  Setup

$ npm i @vue-flow/core

# or
$ pnpm i @vue-flow/core

# or
$ yarn add @vue-flow/core

๐ŸŽฎ Quickstart

In Vue Flow, an application structure consists of nodes and edges, all of which are categorised as elements.

Each element requires a unique id.

Nodes additionally need an XY-position, while edges require a source and a target, both represented by node ids.

<!-- Flowchart.vue -->
<script setup>
import { VueFlow } from '@vue-flow/core'

const nodes = ref([
  { id: '1', type: 'input', label: 'Node 1', position: { x: 250, y: 5 } },
  { id: '2', label: 'Node 2', position: { x: 100, y: 100 } },
  { id: '3', label: 'Node 3', position: { x: 400, y: 100 } },
  { id: '4', label: 'Node 4', position: { x: 400, y: 200 } },
])
  
const edges = ref([
  { id: 'e1-2', source: '1', target: '2', animated: true },
  { id: 'e1-3', source: '1', target: '3' },
])
</script>

<template>
  <VueFlow v-model:nodes="nodes" v-model:edges="edges"></VueFlow>
</template>

โš ๏ธ Make sure to import the necessary styles:

/* import the required styles */
@import "@vue-flow/core/dist/style.css";

/* import the default theme (optional) */
@import "@vue-flow/core/dist/theme-default.css";

Do not scope these styles with scoped in your component.

๐Ÿชด Vue 2

This library doesn't work with Vue 2.

Vue Flow uses features that are exclusive to Vue 3, therefore there is no support for Vue 2, nor will there be any support in the future, sorry.

๐Ÿงช Development

Prerequisites

# install pnpm if you haven't already
$ npm i -g pnpm

# start examples
$ pnpm dev

# build all packages
$ pnpm build

๐Ÿณ Dev Container

To start using development containers, install the Docker extension for VSCode. After installing the extension, open the connection menu either on the bottom left or open it via the commands tab. Select the Open Folder in Container option to mount the project.

The development container will spin up all packages example apps and forward the ports to your machine.

discord logo Discord

Join the Vue Flow Discord server!

Here you can ask questions to the community, propose ideas for new features or share your work that you have built with Vue Flow.

๐Ÿ’ Special Thanks

This project is built with

  • React Flow

    • Vue flow is heavily based on webkids' ReactFlow. I wholeheartedly thank them for their amazing work! Without them VueFlow would not exist. Please consider donating or subscribing to ReactFlow Pro.
  • D3.js

    • D3 makes all the zoom and pan actions in Vue Flow possible.
  • VueUse

    • VueUse is a collection of essential vue composition utilities

โญ Stargazers

Many thanks to the kind individuals who leave a star. Your support is much appreciated!

Stargazers for @vue-flow/core

vue-flow's People

Contributors

azamat7g avatar bcakmakoglu avatar congyuwang avatar github-actions[bot] avatar jayrchamp avatar katlyn avatar larchliu avatar lehoczky avatar logaretm avatar nihiyama avatar oas avatar oe1rfc avatar owenconti avatar pdiee avatar poerlang avatar robin-hoodie avatar skraye avatar snoozbuster avatar srborines avatar tchiotludo avatar thanakorn-ki avatar thomasmountford avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-flow's Issues

Nesting support

Thanks for a great project.
Do you plan to support nesting nodes?
There are two types of nesting:

  1. When we need to find out and display which block (group) the nodes belong to.
    145136647-90228261-a91e-46f0-9c58-6c0a24a5f136
  2. When we need to be able to connect groups in each other

138313998-3102309a-daf6-4af0-bdba-9b0b2bf22524

NodeWrapper events (onMouseEnter, onMouseMove, onMouseLeave) not being emitted

NodeWrapper events (onMouseEnter, onMouseMove, onMouseLeave) not being emitted

In the file NodeWrapper.vue, it seems like the following methods: onMouseEnter, onMouseMove and onMouseLeave will never be able to trigger the event since "dragging" is a ref object and will always result to be true.

It should be changed to "dragging.value" so that it is correctly evaluated.

Example:

const onMouseEnter = (event: MouseEvent) => {
  if (!dragging.value) {
    emit.mouseEnter({ event, node, connectedEdges: getConnectedEdges([node], edges) })
  }
}

Thank you

Feature request: auto layout

In the previous version, you mentioned using dagre to do auto layout, but in the recent version, I can't find this piece of content. And in my practice, dagre doesn't seem to work with custom nodes.
So, do you have plans to support auto layout?

(Beta): node deletion brokes

Hi!
got o.value is undefined when trying to delete node... Even on the basic example
here is the code:


<template>
  <q-page style="height: 80vh">
    <VueFlow class="vue-flow-basic-example">
      <MiniMap />
      <Controls />
      <Background color="#aaa" :gap="8" />
      <div style="position: absolute; right: 10px; top: 10px; z-index: 4">
        <button class="button" @click="resetTransform">reset transform</button>
        <button class="button" @click="updatePos">change pos</button>
        <button class="button" @click="toggleClassnames">
          toggle classnames
        </button>
        <button class="button" @click="logToObject">toObject</button>
      </div>
    </VueFlow>
  </q-page>
</template>

<script setup>
// script setup
import {
  VueFlow,
  MiniMap,
  Controls,
  Background,
  useVueFlow,
} from "@braks/vue-flow";
const initialNodes = [
  // input node
  { id: "1", type: "input", label: "Node 1", position: { x: 250, y: 5 } },

  // default node(s)
  { id: "2", label: "Node 2", position: { x: 100, y: 100 } },
  { id: "3", label: "Node 3", position: { x: 400, y: 100 } },
  { id: "4", label: "Node 4", position: { x: 400, y: 200 } },
];

const initialEdges = [
  // animated edge
  { id: "e1-2", source: "1", target: "2", animated: true },

  // default edge
  { id: "e1-3", source: "1", target: "3" },
];

/**
 * Initialize your graph with the useVueFlow composable.
 * The composable accepts the same options as the VueFlow component.
 * It returns event hooks, a store instance and convenience functions like addEdges or addNodes for easy
 * access to the internal state of VueFlow.
 * As an added bonus everything is typed, so your TypeScript experience should be a lot smoother than it is
 * using the options-API where a lot has to be type-casted.
 **/
const {
  instance,
  nodes,
  addEdges,
  onPaneReady,
  onConnect,
  onNodesChange,
  onNodeDragStop,
  onNodeClick,
} = useVueFlow({
  nodes: initialNodes,
  edges: initialEdges,
  defaultZoom: 1.5,
  minZoom: 0.2,
  maxZoom: 4,
  zoomOnScroll: false,
});
onNodeDragStop(({ node }) => console.log("drag stop", node));
onNodeClick(({ node }) => console.log("click", node));
onNodesChange((changes) => changes.forEach((change) => console.log(change)));
onConnect((params) => addEdges([params]));
onPaneReady(({ fitView }) => fitView({ padding: 0.75 }));

/**
 * You can manipulate the position of a nodes directly by changing it's values when accessed from the composable.
 * This can be done for any property in a node or edge.
 * See the "toggleClassnames" function below for another example on changing properties of nodes.
 **/
const updatePos = () => {
  nodes.value.forEach((el) => {
    el.position = {
      x: Math.random() * 400,
      y: Math.random() * 400,
    };
  });
};

const logToObject = () => console.log(instance.value?.toObject());
const resetTransform = () =>
  instance.value?.setTransform({ x: 0, y: 0, zoom: 1 });
const toggleClassnames = () =>
  nodes.value.forEach(
    (el) => (el.class = el.class === "dark" ? "light" : "dark")
  );
</script>

Edge g container is cutting connectors

Hi,
Just found one issue that making connectors pretty unusable.
The SVG group element (with classes .vue-flow__edges .vue-flow__container) is holding all the connectors and has a size of Flow visible area. When the flow diagram is not fitting the screen size nodes are displayed properly, but all connectors are getting cut by initial view frame.
To reproduce it you would need to have two nodes and one connector between them. One node should be located outside of the visible view below. Connector will get cut by the screen view even by panning and zooming.
I hope my explanation is making sense.
Best

Snap grid snaps based on starting location

Expected Behavior

Snap grid should snap all nodes to multiples of the grid resolution.

Current Behavior

The elements snap but it seems to be based on their starting position, hence, it is possible for two elements to be slightly misaligned.

Steps to Reproduce

  1. In interaction example: https://vueflow.dev/examples/interaction.html
  2. Add :snap-to-grid="true" in editor to VueFlow element
  3. Try to move Node 2 or Node 3 to the same y as Node 1

Context (Environment)

I think that the main idea of a snap grid is that you can properly align elements because for most people it is mildly annoying if elements are slightly misaligned.

Possible Implementation

Snap the position to the resolution rather than the delta which is what I assume is done now.

Thanks

Should also be said: Thank you for working on this project. It's pretty cool, documentation is great and saved me a lot of work!

dragndrop is not working

I'll try to use dragndrop example, but I'm getting many errors

I'm testing the library with laravel-mix, and when I try to compile gives me this error:

image

And the method onDrop it isn't fire,

I hope somebody can help me!

Regards

Is is possible to use vue-flow component in non-typescript Vue3 project?

Hi @bcakmakoglu ,

Thank you for an amazing product. We want to integrate it in our own Vue3 project, which is not written in typescript. Is it possible to partially integrate this component, or shall we first convert the project to typescript?

And would you be OK to support us to integrate this plugin for our own custom needs? We would be more than happy to compensate for it.

Nuxt 3 CJS and ES module - warning

Hello!

I'm creating a new Nuxt 3 app using vue-flow and while everything works correctly, I'm getting the below warning (sorry for the low resolution, click to view) :

nuxt3-warning

Bug: Edges not updatable

Discussed in #180

Originally posted by m-tatsuya June 10, 2022
I referred to "Updatable Edge" in Examples, but couldn't update Edge.
I placed the Source of Examples in my project and checked it, but I couldn't update Edge as well.

Do you need more action than in the Examples source?
(Reference: https://vueflow.dev/examples/updatable-edge.html)

Thanks.

Support for Multiple Source and Target Positions?

Hey There,

Thanks for the amazing library! Wondering if it's possible to allow edges to connect to more than one position / side of a node. I have a complex workflow where I want nodes coming in and exiting from both the tops / bottoms and sides and am unsure how to accomplish that currently.

Any help would be greatly appreciated.

Is Vue3 currently used capable of supporting Vue2.x?

I'm considering using this awesome component for the existing Vue2.x project, but I found that this component is written in Vue3 and is incompatible.
Do you think it will be compatible with Vue2.x?
thank you

getEdgeId

๐Ÿ™ Can you please make getEdgeId available to import? Or can you give me an advise how to modify an edge on connect? I mean to make it arrowed, colored, labeled, etc...

onConnect((params) => {
  console.log("on connect", params);
  console.log("on connect edge id", getEdgeId(params));
  addEdges([params]);
});

When deleting a node, the neighboring edge deletes

Issue tracker is ONLY used for reporting bugs.

New features should be discussed in the discussions.

Title

When deleting a node, the neighboring edge deletes also.

Expected Behavior

When you delete a node -- only edges, connected to it, should be deleted also.

Current Behavior

When deleting a node, the neighboring edge deletes also, but only visually. When you add new node or change something, it's appearing back.

Possible Solution

Steps to Reproduce

  1. Create any type of node. Then create the four nodes below.
  2. Create the edges from the first top node to the every bottom node, in order from left to right. So you should have one node on the top and four edges from it to the every bottom node
  3. Start deleting bottom nodes, from left to right.
  4. You will see what when node deleted, the edge to this node is also deleted (it is normal), but previously created edge from the top node to the neighbour node deletes also, and this is seems a bug.

Context (Environment)

Detailed Description

Possible Implementation

Connection Mode `loose` not working correctly

Connection Mode loose not working correctly

When using ConnectionMode.Loose edges are still created from target/source handles instead of any handle (which loose should enable)

Expected Behavior

Creating edges works from any handle and connects to that handle instead of another one

Current Behavior

Edges are only created at source/target positions.

Conditional adding edges

Hello,

I'd like to call addEdges([params]) function conditionaly, if the params is right, but as I see the edge creates regardless of this function call (so i can remove the addEdges() from the code and the new edges still will be created).

Please tell me how I can conditionaly create the new edges ( with nodes it is work: addNodes([newNode]) creates the new node and if the conditions isn't fit, i dont call the addNodes function and node doesn't create )

Vue3, Quasar: module not found

Hi,
I am trying to add vue-flow into a Quasar app and getting a strange error message as soon as I include VueFlow as a component to a vue template script:

ERROR in ./src/components/New.vue?vue&type=script&lang=ts (./node_modules/@quasar/app/lib/webpack/loader.js.transform-quasar-imports.js!./node_modules/ts-loader/index.js??clonedRuleSet-3.use[0]!./node_modules/@quasar/app/lib/webpack/loader.vue.auto-import-quasar.js??ruleSet[0].use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/New.vue?vue&type=script&lang=ts) 3:0-42

Module not found: Error: Default condition should be last one

The error looks a bit weird and google unable help me.. Do you have any idea how to solve this error?
The import code is taken from samples. and line components: {} breaks compilation:

import { VueFlow, Elements } from '@braks/vue-flow'

export default defineComponent({
  components: { VueFlow },

Thanks!

An issue to say thank you

I started using this library a few days ago and it is wonderful.

I wanted to say thank you, really, this contribution to the Vue ecosystem is wonderful.

Thank you very much to you and to the contributors for this work, it's very enjoyable. โค๏ธ

Not working with Nuxt 3

Hello,

First thanks for your project! It seems amazing and we really want to integrate it as the flow builder for our apps. However we are using Nuxt 3 and I can't find a way to make it work. I tried copying & pasting the minimal example that is in the GitHub main page, as well as the one from the documentation site (Basic.vue), but it just doesn't show anything on the page.

Is there anything specific I have to do to make it work with Nuxt 3? Thanks!

Using `updateEdge()` with Composition API doesn't immediately render update

Discussed in #294

Originally posted by Modjular October 4, 2022
Here's how I'm using updateEdge in my SFC

onEdgeUpdate(({ edge, connection }) => updateEdge(edge, connection))

And my VueFlow config

<template>
  <VueFlow
    v-model="elements"
    :edges-updatable="true"
    :fit-view-on-init="true"
    :connection-mode="ConnectionMode.Strict"
  >
...

When dragging the edge to a new handle, it updates the store, but the changes don't appear until I cause a re-paint, such as dragging a node.

Am I missing a setting in the config?

Handle positioning

Sorry for multiple issues ๐Ÿ’ฏ
Is it possible to move handle with styling? Or maybe you can add more predefined positions: 'top-right', etc...
I trying to make something like this
example

Resizeable nodes [new feature]

What about a new feature: at node level we can specify a new property 'resize' with the following allowed values 'no', 'horizontal', 'vertical', 'both'.

When the value if not 'no', the user can change the node size using the mouse and related resize handle(s).

See this discussion for more details.

TypeError: Cannot read properties of undefined (reading 'position') and (reading 'id')

Adding a node to board, then try to delete it with BACKSPACE key.
Using vue-flow 0.4.35 and vite 3.0.4

Expected Behavior

I would delete the node

Current Behavior

Console errors

Cannot read properties of undefined (reading 'position')
    at _a2 (vue-flow.es.js:4218:30)
...
Cannot read properties of undefined (reading 'id')
    at vue-flow.es.js:3747:44

Steps to Reproduce

Minimal Github repo

  1. Add a node to board
  2. Select node
  3. Press BACKSPACE key to delete it

Wrong Handle position on nodes with dynamic height

Wrong Handle position on nodes with dynamic height

Expected Behavior

When node height changes, handle position will update

Current Behavior

When node height changes, handle position not changing and edge drawn from old position

Steps to Reproduce

Custom node with textarea which changes node height.

Handle component:

<Handle
            v-if="data.outputHandleId"
            :id="data.outputHandleId"
            :position="Position.Right"
            :connectable="true"
            type="source"
        />

Detailed Description

Screencast:

VueFlowEdgePositionBug.mp4

Thank you.

Examples not working on iOS with Safari browser

I tried the various examples using an iPad with Safari and no one is working.
Instead using Google Chrome all is ok.

I also tested the examples in my Mac with Safari and they are fines (i.e. the problems is only with Safari mobile)

label style on an edge like hover in css?

I've used EdgeText to implement a label on an edge. And the static style of the label has been set. Now I want to set the style when the mouse is over the label. Something like 'hover' in css.
Is it supported by the project?

custome edge doesn't work

I've implemented my custom edge with desired style. I found, however, the default type was still used to form connections when I drag a handle to another when connecting. How can I solve it?

Missing arrow end/start of an Edge

Expected Behavior

An arrow appears on the end of the edge when makerEnd property given.

Current Behavior

No arrows on edges.

Steps to Reproduce

https://vueflow.dev/examples/edges.html

{
  id: 'e5-7',
  ...someProperties,
  markerEnd: MarkerType.ArrowClosed,
}

But there is no arrow pointing to Output 7 from Node 5 on Preview.

Detailed Description

I noticed slight difference on type definition of markerEnd property when compared with React Flow. I've tried altering markerEnd: MarkerType.Arrow to markerEnd: { type: MarkerType.Arrow } as docs of React Flow suggest. Arrows still missing. I wonder if this has something to do with it.

Similar behavior on makerStart, too.

Or does it need some additional styling file or scripts to apply?

Why first node position always located at (0,0), whatever I initialize it?

I found two issues:

  1. When I put several nodes and edges into two array separately, and assign them to :nodes and :edges, also gave the nodes init position values, but the first (also the root) node is always located at (0,0), not the value I gave (340, 20);
    location-bug
  2. If some of the edges are not visible(out of canvas) after the first init, they will keep invisible all the time even I drag them into canvas.
    edges-bug

When I just gave the init position value(0, 0) to the first node , I found the second issue.

Connection line always comes from first handle if there are multiple handles in custom node

Hi Braks,

Thank you for creating this library for Vue! This library is awesome.

I recently found out a small issue when trying to work with custom node. I found that when I try to drag and connect from one handle of my custom node to another node, the connection line always got plotted from the first handle that I defined for my custom node. This behavior seems to happen in the demo/examples as well, so it should be straightforward to recreate.

I was trying to dive into the code a bit, I found that it may be because of the following logics of picking [0] if certain information is not available:

 const sourceHandle =
  store.connectionHandleId && store.connectionHandleType
    ? props.sourceNode.handleBounds[store.connectionHandleType]?.find((d: HandleElement) => d.id === store.connectionHandleId)
    : store.connectionHandleType && props.sourceNode.handleBounds[store.connectionHandleType ?? 'source']?.[0]

I will also try to dive into code, when you get a time, could you help take a look at this small issue?

Thanks!

Creating a new edge creates another useless edge

Title

Creating a new edge creates another useless edge

Expected Behavior

Only created Edges are displayed.

Current Behavior

In addition to the created Edge, another Edge will be created at (0, 0) position.

ใ‚นใ‚ฏใƒชใƒผใƒณใ‚ทใƒงใƒƒใƒˆ 2022-05-29 12 55 14

Possible Solution

In src/utils/graph.ts, return of add Edge function fix.

export const addEdge = (edgeParams: Edge | Connection, elements: Elements, defaults?: DefaultEdgeOptions) => {
  if (!edgeParams.source || !edgeParams.target) {
    console.warn("[vueflow]: Can't create edge. An edge needs a source and a target.")
    return elements
  }

  let edge
  if (isEdge(edgeParams)) {
    edge = { ...edgeParams }
  } else {
    edge = {
      ...edgeParams,
      id: getEdgeId(edgeParams),
    } as Edge
  }
  edge = parseEdge(edge, defaults)
  if (connectionExists(edge, elements)) return elements
  elements.push(edge)
  return elements
  // return [...elements, edge]
}

Can't create new edge (js)

Hi! At first thanks for your work!
Can't understand what I'm doing wrong...

    const onConnect = (params) => {
      console.log("on connect", params);
      elements.value = addEdge(params, elements.value);
    };

and the console output is:

source: "3"โ€‹
sourceHandle: nullโ€‹
target: "4"โ€‹
targetHandle: ""

Uncaught TypeError: t is undefined

my custom node:

<template>
  <Handle
    type="target"
    :position="Position.Left"
    :style="{
      background: '#fff',
      border: '1px solid',
      'border-color': getCssVar('warning'),
      width: '10px',
      height: '10px',
    }"
  />
  <q-card>
    <q-card-section class="bg-warning text-white text-h6">
      {{ node.label }}
    </q-card-section>
    <q-card-section>
      <q-input label="Sec" outlined="" v-model="node.value" />
    </q-card-section>
  </q-card>
  <Handle
    type="source"
    :position="Position.Right"
    :style="{
      background: '#fff',
      border: '1px solid',
      'border-color': getCssVar('warning'),
      width: '10px',
      height: '10px',
    }"
  />
</template>

<script>
import { defineComponent, ref } from "vue";
import { Handle, Position } from "@braks/vue-flow";

import { getCssVar } from "quasar";

export default defineComponent({
  name: "MessageNode",
  components: {
    Handle,
  },
  props: ["data"],
  setup(props) {
    const node = ref(props.data);
    return {
      getCssVar,
      Position,
      node,
    };
  },
});
</script>

Multiconnections

Hi! Is it possible to connect multiple edges to one target handle? In my case it will be very useful.

:zoom-on-pinch="false" not work

I set the property zoom-on-pinch to false, but is it still possible to zoom in and out when pinching (touch or trackpad).
code example:

<vue-flow
    ref="vueFlow"
    @dragover="onDragOver"
    class="vue-flow-container"
    v-model="elements"
    :zoom-on-pinch="false"
    :zoom-on-double-click="false"
  >
    <template #edge-custom="props">
      <custom-edge v-bind="props" @handleAdd="handleAdd" @onDrop="btnOnDrop" />
    </template>
  </vue-flow>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.