Skip to content

Commit

Permalink
Update dashCytoscape to v0.1.1 (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
rpkyle committed Jan 4, 2020
1 parent e1f25c1 commit 77e9a6e
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 26 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Package: dashCytoscape
Title: A Component Library for Dash aimed at facilitating network visualization in Python, wrapped around Cytoscape.js
Title: A Component Library for Dash aimed at facilitating network visualization in R, wrapped around Cytoscape.js
Version: 0.1.1
Authors @R: as.person(c(The Plotly Team <cytoscape@plot.ly>))
Description: A Component Library for Dash aimed at facilitating network visualization in Python, wrapped around Cytoscape.js
Description: A Component Library for Dash aimed at facilitating network visualization in R, wrapped around Cytoscape.js
Depends: R (>= 3.0.2)
Imports: dash
Suggests: testthat, roxygen2
Imports:
Suggests:
License: MIT + file LICENSE
URL: https://github.com/plotly/dash-cytoscape
BugReports: https://github.com/plotly/dash-cytoscape/issues
Encoding: UTF-8
LazyData: true
KeepSource: true
Author: The Plotly Team [aut]
Maintainer: The Plotly Team <cytoscape@plot.ly>
9 changes: 5 additions & 4 deletions R/cytoCytoscape.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

cytoCytoscape <- function(id=NULL, className=NULL, style=NULL, elements=NULL, stylesheet=NULL, layout=NULL, pan=NULL, zoom=NULL, panningEnabled=NULL, userPanningEnabled=NULL, minZoom=NULL, maxZoom=NULL, zoomingEnabled=NULL, userZoomingEnabled=NULL, boxSelectionEnabled=NULL, autoungrabify=NULL, autolock=NULL, autounselectify=NULL, autoRefreshLayout=NULL, tapNode=NULL, tapNodeData=NULL, tapEdge=NULL, tapEdgeData=NULL, mouseoverNodeData=NULL, mouseoverEdgeData=NULL, selectedNodeData=NULL, selectedEdgeData=NULL) {

props <- list(id=id, className=className, style=style, elements=elements, stylesheet=stylesheet, layout=layout, pan=pan, zoom=zoom, panningEnabled=panningEnabled, userPanningEnabled=userPanningEnabled, minZoom=minZoom, maxZoom=maxZoom, zoomingEnabled=zoomingEnabled, userZoomingEnabled=userZoomingEnabled, boxSelectionEnabled=boxSelectionEnabled, autoungrabify=autoungrabify, autolock=autolock, autounselectify=autounselectify, autoRefreshLayout=autoRefreshLayout, tapNode=tapNode, tapNodeData=tapNodeData, tapEdge=tapEdge, tapEdgeData=tapEdgeData, mouseoverNodeData=mouseoverNodeData, mouseoverEdgeData=mouseoverEdgeData, selectedNodeData=selectedNodeData, selectedEdgeData=selectedEdgeData)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = list(id=id, className=className, style=style, elements=elements, stylesheet=stylesheet, layout=layout, pan=pan, zoom=zoom, panningEnabled=panningEnabled, userPanningEnabled=userPanningEnabled, minZoom=minZoom, maxZoom=maxZoom, zoomingEnabled=zoomingEnabled, userZoomingEnabled=userZoomingEnabled, boxSelectionEnabled=boxSelectionEnabled, autoungrabify=autoungrabify, autolock=autolock, autounselectify=autounselectify, autoRefreshLayout=autoRefreshLayout, tapNode=tapNode, tapNodeData=tapNodeData, tapEdge=tapEdge, tapEdgeData=tapEdgeData, mouseoverNodeData=mouseoverNodeData, mouseoverEdgeData=mouseoverEdgeData, selectedNodeData=selectedNodeData, selectedEdgeData=selectedEdgeData),
props = props,
type = 'Cytoscape',
namespace = 'dash_cytoscape',
propNames = c('id', 'className', 'style', 'elements', 'stylesheet', 'layout', 'pan', 'zoom', 'panningEnabled', 'userPanningEnabled', 'minZoom', 'maxZoom', 'zoomingEnabled', 'userZoomingEnabled', 'boxSelectionEnabled', 'autoungrabify', 'autolock', 'autounselectify', 'autoRefreshLayout', 'tapNode', 'tapNodeData', 'tapEdge', 'tapEdgeData', 'mouseoverNodeData', 'mouseoverEdgeData', 'selectedNodeData', 'selectedEdgeData'),
package = 'dashCytoscape'
)

component$props <- filter_null(component$props)

structure(component, class = c('dash_component', 'list'))
}

8 changes: 1 addition & 7 deletions R/internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
deps_metadata <- list(`dash_cytoscape` = structure(list(name = "dash_cytoscape",
version = "0.1.1", src = list(href = NULL,
file = "deps"), meta = NULL,
script = "dash_cytoscape.min.js",
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCytoscape",
all_files = FALSE), class = "html_dependency"),
`dash_cytoscape_dev` = structure(list(name = "dash_cytoscape",
version = "0.1.1", src = list(href = NULL,
file = "deps"), meta = NULL,
script = "dash_cytoscape.dev.js",
script = 'dash_cytoscape.min.js',
stylesheet = NULL, head = NULL, attachment = NULL, package = "dashCytoscape",
all_files = FALSE), class = "html_dependency"))
return(deps_metadata)
Expand Down
4 changes: 4 additions & 0 deletions dash-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pkg_help_description: >-
A Component Library for Dash aimed at facilitating network visualization in R, wrapped around Cytoscape.js
pkg_help_title: >-
A Component Library for Dash aimed at facilitating network visualization in R, wrapped around Cytoscape.js
19 changes: 9 additions & 10 deletions man/cytoCytoscape.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ A Component Library for Dash aimed at facilitating network visualization in Pyth
}

\usage{
cytoCytoscape(id=NULL, className=NULL, style=NULL, elements=NULL,
stylesheet=NULL, layout=NULL, pan=NULL, zoom=NULL, panningEnabled=NULL,
userPanningEnabled=NULL, minZoom=NULL, maxZoom=NULL, zoomingEnabled=NULL,
userZoomingEnabled=NULL, boxSelectionEnabled=NULL, autoungrabify=NULL,
autolock=NULL, autounselectify=NULL, autoRefreshLayout=NULL, tapNode=NULL,
tapNodeData=NULL, tapEdge=NULL, tapEdgeData=NULL, mouseoverNodeData=NULL,
mouseoverEdgeData=NULL, selectedNodeData=NULL, selectedEdgeData=NULL)
cytoCytoscape(id=NULL, className=NULL, style=NULL, elements=NULL, stylesheet=NULL,
layout=NULL, pan=NULL, zoom=NULL, panningEnabled=NULL, userPanningEnabled=NULL,
minZoom=NULL, maxZoom=NULL, zoomingEnabled=NULL, userZoomingEnabled=NULL,
boxSelectionEnabled=NULL, autoungrabify=NULL, autolock=NULL,
autounselectify=NULL, autoRefreshLayout=NULL, tapNode=NULL, tapNodeData=NULL,
tapEdge=NULL, tapEdgeData=NULL, mouseoverNodeData=NULL, mouseoverEdgeData=NULL,
selectedNodeData=NULL, selectedEdgeData=NULL)
}

\arguments{
Expand All @@ -27,7 +27,7 @@ class attribute).}
\item{style}{Named list. Add inline styles to the root element.}
\item{elements}{List. A list of dictionaries representing the elements of the networks.
\item{elements}{List of named lists. A list of dictionaries representing the elements of the networks.
1. Each dictionary describes an element, and specifies its purpose.
- `group` (string): Either 'nodes' or 'edges'. If not given, it's automatically inferred.
- `data` (dictionary): Element specific data.
Expand All @@ -47,7 +47,7 @@ class attribute).}
2. The [official Cytoscape.js documentation](http://js.cytoscape.org/#notation/elements-json) offers an extensive overview and examples of element declaration.}
\item{stylesheet}{List. A list of dictionaries representing the styles of the elements.
\item{stylesheet}{List of named lists. A list of dictionaries representing the styles of the elements.
1. Each dictionary requires the following keys:
- `selector` (string): Which elements you are styling. Generally, you select a group of elements (node, edges, both), a class (that you declare in the element dictionary), or an element by ID.
- `style` (dictionary): What aspects of the elements you want to modify. This could be the size or color of a node, the shape of an edge arrow, or many more.
Expand Down Expand Up @@ -203,4 +203,3 @@ Shift+Click to select multiple nodes, or Shift+Drag to use box selection). Read-
\item{selectedEdgeData}{Unnamed list. The list of data dictionaries of all selected edges (e.g. using
Shift+Click to select multiple nodes, or Shift+Drag to use box selection). Read-only.}
}
11 changes: 11 additions & 0 deletions man/dashCytoscape-package.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
% Auto-generated: do not edit by hand
\docType{package}
\name{dashCytoscape-package}
\alias{dashCytoscape}
\title{A Component Library for Dash aimed at facilitating network visualization in R, wrapped around Cytoscape.js}
\description{
A Component Library for Dash aimed at facilitating network visualization in R, wrapped around Cytoscape.js
}
\author{
\strong{Maintainer}: The Plotly Team <cytoscape@plot.ly>
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"build:js-all": "npm run build:js && npm run build:js-dev && npm run build:js-dev-extra && npm run build:js-extra",
"build:py": "dash-generate-components ./src/lib/components dash_cytoscape",
"build:py-activated": "(. venv/bin/activate || venv\\scripts\\activate && npm run build:py)",
"build:r": "dash-generate-components ./src/lib/components dash_cytoscape --r-prefix='cyto'",
"build:all": "npm run build:js-all && npm run build:py",
"build:all-activated": "(. venv/bin/activate || venv\\scripts\\activate && npm run build:all)"
},
Expand Down

0 comments on commit 77e9a6e

Please sign in to comment.