1.0.6 • Published 3 years ago

netv-box-selection v1.0.6

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

netv-box-selection

Box selection plugin for NetV.js(http://netv.zjuvag.org/)

box-selection-demo

API reference

boxSelection = new BoxSelection(netv, configs)

Create boxSelection handler

  • netv: NetV: pass core NetV object
  • configs: {}: key-value pair configs
    • enable: bool: default enable box-selection or not
    • boxStyle: {}: selection box's style (below is supported attribute and their default value)
      • fill: rgba(200, 200, 200, 0.2),
      • stroke: black,
      • stroke-width: 1,
      • stroke-dasharray: []

boxSelection.dispose()

Dispose boxSelection handler, clean related DOM element

boxSelection.enable()

Manually enable box selection.

boxSelection.disable()

Manually disable box selection.

boxSelection.onSelected(callback: (nodes: Node[]) => {})

Set callback function, the callback can get selected nodes in NetV's Node type.

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago