# visualne-connection-plugin

> A plugin for VisualNE that allows the user to connect nodes

Latest version **1.0.5** (published 2020-12-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install visualne-connection-plugin
pnpm add visualne-connection-plugin
yarn add visualne-connection-plugin
bun add visualne-connection-plugin
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2020-12-03 |
| First published | 2020-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 46.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Valencio Hoffman |
| Maintainers | vamidi |

## Links

- npm: https://www.npmjs.com/package/visualne-connection-plugin
- Repository: https://github.com/vamidi/connection-plugin
- Homepage: https://github.com/vamidi/connection-plugin#readme
- Issues: https://github.com/vamidi/connection-plugin/issues
- npm.io page: https://npm.io/package/visualne-connection-plugin

## Recent versions

- 1.0.5 (latest) — 2020-12-03
- 1.0.4 — 2020-12-02
- 1.0.3 — 2020-11-25
- 1.0.2 — 2020-11-25
- 1.0.1 — 2020-11-25
- 1.0.1-nn — 2020-11-25
- 1.0.0 — 2020-11-24

## README

VisualNE connection plugin
====
#### visualne.js plugin

Install
---
```ts
import { ConnectionPlugin } from 'visualne-connection-plugin';

editor.use(ConnectionPlugin);
```

Events
---

```js
editor.on('connectionpath', data => {
    const {
        points, // array of numbers, e.g. [x1, y1, x2, y2]
        connection, // Rete.Connection instance
        d // string, d attribute of <path>
    } = data;

    data.d = `M ${x1} ${y1} ${x2} ${y2}`; // you can override the path curve
});
```

```js
editor.on('connectiondrop', io /* Input or Output */ => {
    // triggered when the user drops picked connection
});
```

```js
editor.on('connectionpick', io /* Input or Output */ => {
    // triggered when the user tries to pick a connection
    // you can prevent it
    return false;
});

editor.trigger('resetconnection'); // reset pseudo connection
```

---
_Source: https://npm.io/package/visualne-connection-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
