retejs / rete

JavaScript framework for visual programming
https://retejs.org
MIT License
10.06k stars 652 forks source link

customize nodes in Angular app #318

Closed Githamza closed 5 years ago

Githamza commented 5 years ago

I would change Components/nodes colors, borders ect

I have tried to use examples given here

I'm not able to integrate them to my angular app example

Ni55aN commented 5 years ago

Rendering plugins require a compiled Vue component with a render function. It can be obtained from a single Vue file component (vue-loader is required, but adding Webpack rules to Angular is tricky, as I know) or components compiled in runtime using vue.esm.js

import Vue from 'vue/dist/vue.esm';

const vueComponent = Vue.component('num', {
  template: '...
Ni55aN commented 5 years ago

The same way as component for controls https://github.com/retejs/examples/blob/master/Angular/src/app/rete/controls/number-control.ts#L4

Ni55aN commented 5 years ago

https://stackblitz.com/edit/github-rete-vctacd?file=src/app/rete/custom-node.ts

P.S. I cant save last changes with styles on stackblitz, it hangs