pb10005 / diagram-vue Goto Github PK
View Code? Open in Web Editor NEWA editable SVG-based diagram component for Vue
Home Page: https://diagramvue.netlify.com
License: MIT License
A editable SVG-based diagram component for Vue
Home Page: https://diagramvue.netlify.com
License: MIT License
Hi!
This hard to understand how calculator work, you can add one example for this?
Hi!
How contribute code?
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');
}
}
}
Describe the bug
The 'Select' option of link don't hide when cancel edit on Diagram Editor.
To Reproduce
Steps to reproduce the behavior:
Hi! This have support to add arrows in link both ends or only one side? If not what solution?
Great Work!
Thanks.
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.
Handle event on remove the Node or Link.
This feature is helpful to implementations will coming on History Issue.
Needless to say
I would make the demo page more attractive.
e.g.) Make different sample diagrams
Describe the bug
When in fluid mode, nodes/links don't properly follow the mouse movement;
To Reproduce
Steps to reproduce the behavior:
Toggle fluid
checkboxdoes 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>
I will make it possible to put multiline text in one node.
Text size, stroke weight of links, etc.
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!
Hi!
It would be important to add a change history, what do you think? (back/next)
I will develop next.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.