Skip to content

Commit 8004f07

Browse files
committed
Make lines shorter than 80 characters
1 parent e31f80b commit 8004f07

File tree

2 files changed

+31
-16
lines changed

2 files changed

+31
-16
lines changed

R/bpmnVisualization.R

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,29 @@
1818
#' @description Display BPMN diagram based on BPMN definition in XML format
1919
#'
2020
#' @param bpmnXML A file name or xml document or string in BPMN XML format
21-
#' @param overlays An element or a list of elements to be added to the diagram's existing elements.
22-
#' Use overlay function to create an overlay object with content and relative position.
23-
#' @param width Fixed width for widget (in css units). The default is \code{NULL}, which results in intelligent automatic sizing based on the widget's container.
24-
#' @param height Fixed height for widget (in css units). The default is \code{NULL}, which results in intelligent automatic sizing based on the widget's container.
21+
#' @param overlays An element or a list of elements to be added to the diagram's
22+
#' existing elements.
23+
#' Use overlay function to create an overlay object with content and
24+
#' relative position.
25+
#' @param width Fixed width for widget (in css units).
26+
#' The default is \code{NULL}, which results in intelligent automatic
27+
#' sizing based on the widget's container.
28+
#' @param height Fixed height for widget (in css units).
29+
#' The default is \code{NULL}, which results in intelligent automatic
30+
#' sizing based on the widget's container.
2531
#' @param elementId The id of the HTML element to enclose the widget.
2632
#' Use an explicit element ID for the widget (rather than an automatically
27-
#' generated one). Useful if you have other JavaScript that needs to explicitly
28-
#' discover and interact with a specific widget instance.
33+
#' generated one). Useful if you have other JavaScript that needs to
34+
#' explicitly discover and interact with a specific widget instance.
2935
#'
30-
#' @returns A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts
31-
#' including the R console, within R Markdown documents, and within Shiny output bindings.
36+
#' @returns A \code{bpmn-visualization} Widget that will intelligently print
37+
#' itself into HTML in a variety of contexts including the R console,
38+
#' within R Markdown documents, and within Shiny output bindings.
3239
#'
3340
#' @examples
3441
#' # Load the BPMN file
35-
#' bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualization")
42+
#' bpmn_file <- system.file("examples/Order_Management.bpmn",
43+
#' package = "bpmnVisualization")
3644
#'
3745
#' # Display the BPMN diagram
3846
#' display(bpmn_file, width='auto', height='auto')
@@ -73,14 +81,16 @@ display <- function(bpmnXML,
7381
#'
7482
#' @name bpmnVisualization-shiny-output
7583
#' @description
76-
#' Helper to create output function for using the \code{bpmn-visualization} HTML widget within Shiny applications and interactive Rmd documents.
84+
#' Helper to create output function for using the \code{bpmn-visualization}
85+
#' HTML widget within Shiny applications and interactive Rmd documents.
7786
#'
7887
#' @param outputId output variable to read from
7988
#' @param width,height Must be a valid CSS unit (like \code{'100\%'},
8089
#' \code{'400px'}, \code{'auto'}) or a number, which will be coerced to a
8190
#' string and have \code{'px'} appended.
8291
#'
83-
#' @returns An output function that enables the use of the \code{bpmn-visualization} widget within Shiny applications.
92+
#' @returns An output function that enables the use of the
93+
#' \code{bpmn-visualization} widget within Shiny applications.
8494
#'
8595
#' @export
8696
bpmnVisualizationOutput <- function(outputId,
@@ -97,14 +107,17 @@ bpmnVisualizationOutput <- function(outputId,
97107
#'
98108
#' @rdname bpmnVisualization-shiny-render
99109
#' @description
100-
#' Helper to create render function for using the \code{bpmn-visualization} HTML widget within Shiny applications and interactive Rmd documents.
110+
#' Helper to create render function for using the \code{bpmn-visualization}
111+
#' HTML widget within Shiny applications and interactive Rmd documents.
101112
#'
102-
#' @param expr An expression that generates a \code{bpmn-visualization} HTML widget
113+
#' @param expr An expression that generates a \code{bpmn-visualization} HTML
114+
#' widget
103115
#' @param env The environment in which to evaluate \code{expr}.
104116
#' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This
105117
#' is useful if you want to save an expression in a variable.
106118
#'
107-
#' @returns A render function that enables the use of the \code{bpmn-visualization} widget within Shiny applications.
119+
#' @returns A render function that enables the use of the
120+
#' \code{bpmn-visualization} widget within Shiny applications.
108121
#'
109122
#' @export
110123
renderBpmnVisualization <- function(expr,

R/funs.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ build_bpmnContent <- function(bpmnXML,
4545
bpmnContent <- as.character(xml)
4646
}
4747
} else {
48-
stop("bpmnXML must be a absolute path of BPMN file or the string of the BPMN content !!")
48+
stop("bpmnXML must be a absolute path of BPMN file or the string of the BPMN
49+
content !!")
4950
}
5051
x <- list(bpmnContent = bpmnContent)
5152

5253
if (length(overlays)) {
53-
# In case the user passes a single parameter as overlays (instead of a list), we wrap it into a list so the js can work
54+
# In case the user passes a single parameter as overlay (instead of a list),
55+
# we wrap it into a list, so the js can work.
5456
x$overlays <- if (is.list(overlays[[1]])) {
5557
overlays
5658
} else {

0 commit comments

Comments
 (0)