| Title: | A Directed Acyclic Graph Extension for 'blockr' |
|---|---|
| Description: | Building on the docking layout manager provided by 'blockr.dock', this provides an extension that allows for visualizing and manipulating a 'blockr' board using a DAG-based user interface powered by the 'g6R' graph visualisation HTML widget. |
| Authors: | David Granjon [aut, cre], Nicolas Bennett [aut], Christoph Sax [aut], Bristol Myers Squibb [fnd] |
| Maintainer: | David Granjon <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.1.2 |
| Built: | 2026-06-04 16:58:32 UTC |
| Source: | https://github.com/bristolmyerssquibb/blockr.dag |
Functions for creating and working with context menu entries.
new_context_menu_entry( name, js, action = NULL, condition = TRUE, id = tolower(gsub(" +", "_", name)) ) is_context_menu_entry(x) context_menu_items(x)new_context_menu_entry( name, js, action = NULL, condition = TRUE, id = tolower(gsub(" +", "_", name)) ) is_context_menu_entry(x) context_menu_items(x)
name |
Name of the context menu entry. |
js |
JavaScript code to execute when the entry is selected. |
action |
Action to perform when the entry is selected. |
condition |
Condition to determine if the entry should be shown. |
id |
Unique identifier for the context menu entry.
Inferred from |
x |
Object |
new_context_menu_entry()Creates a new context menu entry with the specified name, JavaScript code, action function, and display condition.
is_context_menu_entry()Tests whether an object is a valid context menu entry.
context_menu_items()Generic function to extract context menu items from various objects like dock extensions, boards, or lists.
The context_menu_items.dag_extension() method
provides the following actions:
Create link - Creates connections between workflow nodes.
Remove block - Removes individual blocks from the workflow.
Remove link - Removes connections between workflow nodes.
Append block - Adds a new block after the selected node.
Create stack - Creates a new workflow stack.
Remove stack - Removes an entire workflow stack.
Edit stack - Opens stack editing interface.
Add block - Adds a new block to the canvas.
new_context_menu_entry()A context menu entry object of class "context_menu_entry" containing condition, action, and js functions, with name and id attributes.
is_context_menu_entry()TRUE if x is
a context menu entry, FALSE otherwise.
context_menu_items()A list of context menu items for the given object.
Visualizes the DAG (directed acyclic graph) underlying a board and provides UI elements to manipulate the board.
new_dag_extension(graph = NULL, ...)new_dag_extension(graph = NULL, ...)
graph |
A |
... |
Forwarded to |
A dag_extension object that extends the dock extension system
for visualizing and manipulating DAG workflows.
R list-based representation of a g6 graph object.
new_graph(nodes = list(), edges = list(), combos = list()) is_graph(x) graph_nodes(x) graph_edges(x) graph_combos(x) as_graph(x, ...) ## S3 method for class 'graph' as_graph(x, ...) ## S3 method for class 'list' as_graph(x, ...)new_graph(nodes = list(), edges = list(), combos = list()) is_graph(x) graph_nodes(x) graph_edges(x) graph_combos(x) as_graph(x, ...) ## S3 method for class 'graph' as_graph(x, ...) ## S3 method for class 'list' as_graph(x, ...)
nodes |
Graph nodes (i.e. board blocks). |
edges |
Graph edges (i.e. board links). |
combos |
Node groups (i.e. board stacks). |
x |
Object to test or convert. |
... |
Generic consistency. |
new_graph()Creates a new graph object with the specified nodes, edges, and combos.
is_graph()Tests whether an object is a valid graph object.
graph_nodes()Extracts the nodes component from a graph object.
graph_edges()Extracts the edges component from a graph object.
graph_combos()Extracts the combos component from a graph object.
as_graph()Generic function to convert objects to graph format.
new_graph()A graph object of class "graph" containing nodes, edges, and combos lists.
is_graph()TRUE if x is a
graph object, FALSE otherwise.
graph_nodes()A list of graph nodes.
graph_edges()A list of graph edges.
graph_combos()A list of graph combos (node groups).
as_graph()A graph object converted from the input.
Functions for creating and working with toolbar items for the DAG interface.
new_toolbar_item(id, icon, js, action = NULL, tooltip = NULL) is_toolbar_item(x) toolbar_items(x)new_toolbar_item(id, icon, js, action = NULL, tooltip = NULL) is_toolbar_item(x) toolbar_items(x)
id |
Unique identifier for the toolbar item. |
icon |
Name of an icon to show in the toolbar. |
js |
JavaScript code to execute when the entry is selected. |
action |
Action to perform when the entry is selected. |
tooltip |
Optional tooltip text for the entry. |
x |
Object |
new_toolbar_item()Creates a new toolbar item with the specified id, icon, JavaScript code, action function, and tooltip text.
is_toolbar_item()Tests whether an object is a valid toolbar item.
toolbar_items()Generic function to extract toolbar items from various objects like dock extensions, boards, or lists.
The toolbar_items.dag_extension() method provides
the following actions:
Zoom in - Increases the graph zoom level.
Zoom out - Decreases the graph zoom level.
Auto fit - Automatically fits the entire graph within the viewport.
Layout - Reapplies the graph layout algorithm to reorganize nodes.
Add block - Opens interface to add a new block to the workflow.
Add stack - Creates a new workflow stack.
Remove selected - Removes currently selected elements from the graph.
new_toolbar_item()A toolbar item object of class "toolbar_item" containing action and js functions, with id, icon, and tooltip attributes.
is_toolbar_item()TRUE if x is
a toolbar item, FALSE otherwise.
toolbar_items()A list of toolbar items for the given object.