Comments (4)
You can subscribe to the addEdge
event of the underlying graph instance: https://github.com/flowbased/fbp-graph/blob/master/src/Graph.coffee#L435
from the-graph.
@bergie Thanks for the info, but
const v = new TheGraph.fbpGraph.Graph();
v.addEventListener("addEdge", e => {
console.log("Add edge!");
console.log(e)
});
does not seem to do the job. It results in a Uncaught TypeError: v.addEventListener is not a function
error.
How do I correctly add a listener for the addEdge
event you've mentioned?
from the-graph.
@YanDoroshenko use:
const v = new TheGraph.fbpGraph.Graph();
v.on('addEdge', (e) => {
console.log('Add edge', e);
});
from the-graph.
@bergie Awesome! Works well, thanks.
from the-graph.
Related Issues (20)
- Dragging to move nodes, create edges unreliable on mouse HOT 2
- Touch-only input broken HOT 3
- Missing dist/ in NPM package HOT 3
- Make icon map loadable via CommonJS HOT 1
- Cannot move viewport using thumbnail HOT 4
- `Nested transactions not supported` error HOT 2
- editor.addErrorNode is not a function
- React16 port HOT 7
- Publish version with latest changes HOT 7
- Node.js tests failing HOT 10
- installing dependecies on linux fails HOT 2
- canvas-prebuilt dependency is no more HOT 2
- Roadmap of this Library HOT 1
- TS typing HOT 1
- Can't resolve 'fs' when using react component
- 'editor' is not defined, and unable to access editor methods in react hooks HOT 2
- Cannot read properties of undefined (reading 'length') HOT 3
- how do I use its `triggerFit` method in react 18? HOT 3
- Nav minimap can't drag properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from the-graph.