rete-drag-selection-plugin

0.1.5 • Public • Published

rete-drag-selection-plugin

This is a fork of WellerQu/rete-selection-plugin

This plugin allows to select more nodes at once by pressing CTRL and dragging an area on the ReteJS editor.

Usage

Install

npm i rete-drag-selection-plugin --save

Basic

import SelectionPlugin from 'rete-drag-selection-plugin'
editor.use(SelectionPlugin, { enabled: true })

Advanced

export interface Cfg {
  /**
   * selection area's className for style
   */
  selectionArea?: {
    className?: string;
  };
  /**
   * selection mode's className for style
   */
  selectionMode?: {
    className?: string;
  };
  /**
   * enabled or disable selection
   * default false
   */
  enabled?: boolean;
  /**
   * mode text
   */
  mode?: [string, string];
}

import SelectionPlugin from 'rete-drag-selection-plugin'
editor.use(SelectionPlugin, {
  enabled: true,
  selectionMode: {
    className: 'text-weight-light custom-selection-pos'
  },
})

Package Sidebar

Install

npm i rete-drag-selection-plugin

Weekly Downloads

13

Version

0.1.5

License

GPL-3.0-or-later

Unpacked Size

124 kB

Total Files

10

Last publish

Collaborators

  • damiano_sca