0.8.54 • Published 3 years ago

@naetverkjs/selection v0.8.54

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

selection-plugin

This plugin was inspired by the WellerQu/rete-selection-plugin

Plugin to render a selection rectangle to allow the multiselection of nodes. Hold Ctrl to enable the multi-selection or to draw a rectangle

Installation

import { SelectionPlugin } from '@naetverkjs/selection';

editor.use(SelectionPlugin);

Parameters

Default

editor.use(SelectionPlugin, {
  enabled: true,
  offset: {
    x: 0,
    y: 0,
  },
  selectorClass: null,
});
  • enabled: Enables or Disables the Plugin
  • offset: The drawing of the rectangle is dependent on the drawing area. If this area is moved, the introduction of an offset can be necessary.
  • selectorClass: Allows the extension of the default class of the selection area which is selection-area