drag-nodes: Drag nodes

Description Usage Arguments Value Examples

Description

Allow user to drag and drop nodes.

Usage

1
2
3
4
5

Arguments

sg

An object of class sigmajsas intatiated by sigmajs.

proxy

An object of class sigmajsProxy as returned by sigmajsProxy.

Value

sg_drag_nodes An object of class htmlwidget which renders the visualisation on print. While sg_drag_nodes_start_p and sg_drag_nodes_kill_p

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# generate graph
nodes <- sg_make_nodes(20)
edges <- sg_make_edges(nodes, 35)

sigmajs() %>%
  sg_nodes(nodes, id, label, size) %>%
  sg_edges(edges, id, source, target) %>%
  sg_drag_nodes()

## Not run: 
# proxies
demo("drag-nodes", package = "sigmajs")

## End(Not run)

sigmajs documentation built on July 8, 2020, 5:16 p.m.