Comments (6)
@henriklippke retejs/rete#633 (comment)
from vue-plugin.
I have to trigger a "connectionremove"
no, it's triggered by the NodeEditor's removeConnection
method
Your connection class (classMyConnection extends ClassicPreset.Connection { .. ) should have a callback like onRemove
and it should be called in the Vue component via a data
property.
from vue-plugin.
@Ni55aN Thanks for your answer, but I still don't quite understand it.
The data property within the CustomConnection Component contains only these props: id,source,sourceOutput, target,targetInput
Could you please show me an example again?
Many thanks
from vue-plugin.
// extend base class
class Connection<A extends Node, B extends Node> extends Classic.Connection<A, B> {
selected?: boolean
remove: (data: Connection<A, B>) => void
constructor(events: { remove: (data: Connection<A, B>) => void }, source: A, target: B, public isLoop?: boolean) {
super(source, 'default', target, 'default')
this.remove = events.remove
}
}
const events = { remove: (data: Schemes['Connection']) => console.log(data) }
// create connection instance and pass event handlers
const c1 = new Connection(events, ...
This way, you can forward an event handler through a connection instance
from vue-plugin.
Hi @Ni55aN
Ok, thanks that worked so far. But now I have the problem that when I don't create a connection manually but when the user pulls a connection between 2 sockets, that then my new connection class is not taken. Do you have an idea for this?
Thanks a lot!
from vue-plugin.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.
from vue-plugin.
Related Issues (20)
- Use Custom Node HTML with latest version HOT 2
- License Missing HOT 2
- Support Vue 3? HOT 1
- Can we have any update on the Vue 3 support? HOT 3
- [question] rete control is not rendered (only html comment instead) HOT 3
- Vue 3 support HOT 9
- Customize nodes in Angular 11 with rete-vue-render-plugin
- Object(...) is not a function HOT 1
- Bug with use HOT 1
- Issues with nuxt: TypeError: Object(...) is not a function HOT 2
- Bootstrap-vue-3 and vue-render-plugin HOT 2
- What is the purpose of mixin.js? HOT 1
- area.update doesn't work HOT 3
- Cannot apply preset. Provided signals are not compatible HOT 4
- TypeError when adding custom "control" preset to VuePlugin instance
- Vue Apps mounting but never unmounting HOT 3
- vue-plugin as local dependency HOT 3
- rendering of data and emit tag as string to html HOT 5
- Click event doesn't fire inside custom components for vue renderer plugin HOT 4
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 vue-plugin.