Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

drag-nodes

Drag nodes


Description

Allow user to drag and drop nodes.

Usage

sg_drag_nodes(sg)

sg_drag_nodes_start_p(proxy)

sg_drag_nodes_kill_p(proxy)

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

# 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

Interface to 'Sigma.js' Graph Visualization Library

v0.1.5
MIT + file LICENSE
Authors
John Coene [aut, cre, cph] (<https://orcid.org/0000-0002-6637-4107>)
Initial release
2020-06-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.