|
22 | 22 | #' Use the \code{create_overlay} function to create an overlay object with content and a relative position. |
23 | 23 | #' @param enableDefaultOverlayStyle If no style is set on an overlay, and this parameter is set to \code{TRUE}, the default style will be applied to the overlay. |
24 | 24 | #' By default, \code{enableDefaultOverlayStyle} is set to \code{TRUE}. |
25 | | -#' @param width A fixed width for the widget (in CSS units). |
| 25 | +#' @param width A fixed width for the widget (in CSS units). |
26 | 26 | #' The default value is \code{NULL}, which results in intelligent automatic sizing based on the widget's container. |
27 | | -#' @param height A fixed height for the widget (in CSS units). |
| 27 | +#' @param height A fixed height for the widget (in CSS units). |
28 | 28 | #' The default value is \code{NULL}, which results in intelligent automatic sizing based on the widget's container. |
29 | 29 | #' @param elementId The ID of the 'HTML' element to enclose the widget. |
30 | | -#' Use an explicit element ID for the widget (rather than an automatically generated one). |
| 30 | +#' Use an explicit element ID for the widget (rather than an automatically generated one). |
31 | 31 | #' This is useful if you have other 'JavaScript' that needs to explicitly |
32 | 32 | #' discover and interact with a specific widget instance. |
33 | 33 | #' |
|
41 | 41 | #' # Display the BPMN diagram |
42 | 42 | #' bpmnVisualizationR::display(bpmn_file, width='auto', height='auto') |
43 | 43 | #' |
44 | | -#' # Display the BPMN diagram featuring overlays and their default style/position |
| 44 | +#' # Display the BPMN diagram featuring overlays with their default positions and styles |
| 45 | +#' overlays <- list( |
| 46 | +#' bpmnVisualizationR::create_overlay("start_event_1_1", "42"), |
| 47 | +#' bpmnVisualizationR::create_overlay("sequence_flow_1_1", "42"), |
| 48 | +#' bpmnVisualizationR::create_overlay("task_1_1", "9"), |
| 49 | +#' bpmnVisualizationR::create_overlay("sequence_flow_1_2", "8"), |
| 50 | +#' bpmnVisualizationR::create_overlay("call_activity_1_1", "7") |
| 51 | +#' ) |
| 52 | +#' bpmnVisualizationR::display( |
| 53 | +#' bpmn_file, |
| 54 | +#' overlays, |
| 55 | +#' width='auto', |
| 56 | +#' height='auto' |
| 57 | +#' ) |
| 58 | +#' |
| 59 | +#' # Display the BPMN diagram featuring overlays using custom styles and positions |
45 | 60 | #' taskStyle <- bpmnVisualizationR::create_style( |
46 | 61 | #' font = bpmnVisualizationR::create_font(color = 'DarkSlateGray', size = 23), |
47 | 62 | #' fill = bpmnVisualizationR::create_fill(color = 'MistyRose'), |
|
63 | 78 | #' ) |
64 | 79 | #' bpmnVisualizationR::display(bpmn_file, overlays, width='auto', height='auto') |
65 | 80 | #' |
66 | | -#' # Display the BPMN diagram featuring overlays, but exclude their default style/position |
| 81 | +#' # Display the BPMN diagram featuring overlays, but exclude their default styles and positions |
67 | 82 | #' overlays <- list( |
68 | 83 | #' bpmnVisualizationR::create_overlay("start_event_1_1", "42", position = "middle-left"), |
69 | 84 | #' bpmnVisualizationR::create_overlay("sequence_flow_1_1", "42", flowStyle, "end"), |
70 | 85 | #' bpmnVisualizationR::create_overlay("task_1_1", "9", taskStyle, "bottom-right"), |
71 | 86 | #' bpmnVisualizationR::create_overlay("sequence_flow_1_2", "8", position = 'start') |
72 | 87 | #' ) |
73 | 88 | #' bpmnVisualizationR::display( |
74 | | -#' bpmn_file, |
75 | | -#' overlays, |
76 | | -#' enableDefaultOverlayStyle=FALSE, |
77 | | -#' width='auto', |
| 89 | +#' bpmn_file, |
| 90 | +#' overlays, |
| 91 | +#' enableDefaultOverlayStyle=FALSE, |
| 92 | +#' width='auto', |
78 | 93 | #' height='auto' |
79 | 94 | #' ) |
80 | 95 | #' |
|
0 commit comments