Git Product home page Git Product logo

diagram-vue's Introduction

GitHub Stats Card Top Languages Card

diagram-vue's People

Contributors

codacy-badger avatar darlandieterich avatar dependabot[bot] avatar pb10005 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

diagram-vue's Issues

Calculator template

Hi!
This hard to understand how calculator work, you can add one example for this?

Best way to watch graphData

What best way to watch graphData? I'm watching the nodes by example, but thi's calling every move. I want filtering ignoring the axis

watch: {
    'graphData.nodes': {
      deep: true,
      handler() {
        console.log('here ignore the move axis');
      }
    }
  }

Diagram Editor don't hide 'Select' link

Describe the bug
The 'Select' option of link don't hide when cancel edit on Diagram Editor.

To Reproduce
Steps to reproduce the behavior:

  1. Click on 'Edit'
  2. On any node and click 'New Link'
  3. And click in 'End'
  4. The link 'Select' dont hide

How add arrows in links?

Hi! This have support to add arrows in link both ends or only one side? If not what solution?

Great Work!
Thanks.

Click event handler for Node and Link components.

I'm trying to make block diagram (like this) and diagram-vue is the best component which I found.

I'd like to hide/show blocks (connected with links) when clicking on neighbor blocks. It would be great if node component has a something like "@click" event handler which allow to specify user-defined functions.

Event handler on Remove

Handle event on remove the Node or Link.
This feature is helpful to implementations will coming on History Issue.

Enrich Demo page

I would make the demo page more attractive.
e.g.) Make different sample diagrams

Nodes/links don't properly follow the mouse movement

Describe the bug
When in fluid mode, nodes/links don't properly follow the mouse movement;

To Reproduce
Steps to reproduce the behavior:

  1. Check Toggle fluid checkbox
  2. Turn on edit mode
  3. Make the size of the window smaller
  4. Drag a node or a link

nodeClicked don't work

does not perform the event when clicked

<template>
  <section>
    <router-link to="/">Home</router-link>
    <Diagram
      :width="2000"
      :height="1000"
      :fluid="false"
      scale="1"
      background="#fafafa"
      :nodes="nodes"
      :links="links"
      :editable="true"
      :labels="{
        edit: 'Edit',
        remove: 'Remove',
        link: 'Link',
        select: 'Select',
      }"
      @editLink="editLink"
      @nodeChanged="nodeChanged"
      @nodeClicked="nodeClicked"
    ></Diagram>
  </section>
</template>
<script>
import Diagram from "diagram-vue";
import data from "../data.json";
export default {
  name: "Customise",
  components: {
    Diagram,
  },
  data() {
    return {
      editable: false,
      nodes: [],
      links: [],
    };
  },
  mounted() {
    this.nodes = data.nodes;
    this.links = data.links;
  },
  methods: {
    nodeClicked(id /* identifier of node */) {
      /* event handler */
      console.log("your clicked in node: ", id);
    },
    editLink(item) {
      console.log("aaaaa");
    },
    nodeChanged(obj) {
      this.nodes = obj.nodes;
      console.log("aqui");
    },
    linkChanged(obj) {
      this.links = obj.links;
    },
  },
};
</script>

Multiline text

I will make it possible to put multiline text in one node.

Possibility to add custom SVG

Hi @pb10005!

It would be interesting to add a custom SVG instead of just "Ellipse" and "Rectangle".
EX: I have an SVG drawing and would like to add it instead of the existing ones. Would it be possible?
Thank you! If you need help just tell me!

Add history

Hi!

It would be important to add a change history, what do you think? (back/next)

I will develop next.

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.