A shiny Module.
Usage
mod_visNetModification_ui(id, useJQ = F, dev = F)
mod_visNetModification_server(
id,
igraphObj,
dev = F,
hard_delete = T,
NodeAttrTooltip = T,
EdgeAttrTooltip = F,
domain = getDefaultReactiveDomain(),
visNet_options = NULL,
layout = "layout_nicely"
)
Arguments
- id
shiny server id
- dev
open a printer
- igraphObj
a reactive graph object
- hard_delete
when this flag is turn off, no edge can be actually deleted/
- NodeAttrTooltip, EdgeAttrTooltip
when these two flag are set to ture attributes will be automatically parsed into tooltips, following formula 'attrName: attr'. There is no good parsing for time series type.
- domain
session
- visNet_options
list of option passed to `visSetOptions`
- layout
igraph layout to put in `visNetwork::visIgraphLayout`
- offset
number of pixel to off set when use maixmize button
Details
$Current is a reactive igraph Object that every is being modified now $Main is the igraph Object that has been committed and saved; In addition it return a set of `reactiveValues` which monitor graph changes and track node that is currently clicked. `click_node` and `click_edge`
Two utility function are added `maximize_helper` return a javascript allow you to resize monitored object to full size. You can use this script on any shiny widget (where you know id), when you use `bs4Dash::box`
To resize this network specifically add this script below `bs4Dash::box` `tags$script(maximize_helper(visNetId('<id>')))`