Connection Mastery ==== #### Rete.js plugin
npm install rete-connection-mastery-pluginConnection Mastery
====
#### Rete.js plugin
This plugin is intended to enhance rete-connection-plugin in terms of user interaction.
- Create node for picked connection and connect (example)
| # | User actions | Editor |
|---|---|---|
| 1 | Press Ctrl on connection drop | Context menu will appear |
| 2 | Select a node by holding down Ctrl | Node will be added. The previously picked Input/Output will be connected with a compatible Output/Input of the added node |
- Delete connection by picking
| # | User actions | Editor |
|---|---|---|
| 1 | Press D and click on the connection | Remove the connection |
``js
import ConnectionMasteryPlugin from 'rete-connection-mastery-plugin';
editor.use(ConnectionMasteryPlugin);
// or disable features
editor.use(ConnectionMasteryPlugin, {
createAndConnect: false,
pickConnection: false
});
// or change keys
editor.use(ConnectionMasteryPlugin, {
createAndConnect: { keyCode: 'ControlLeft' },
pickConnection: { keyCode: 'KeyD' }
});
``