You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- New functions: `create_element_style`, `create_edge_style`, `create_shape_style`, `create_gradient_fill'
- Modified the `create_stroke`, `create_font` and `create_fill` functions to accept additional style properties.
- Updated the `build_bpmnContent` function to accept a `bpmnElementStyles` parameter.
- Updated the `display` function to accept a `bpmnElementStyles` parameter.
- Added an example of how to use `bpmnElementStyles` to define styles for BPMN elements has been added to the function documentation.
Copy file name to clipboardExpand all lines: R/bpmnVisualizationR.R
+49-2Lines changed: 49 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@
22
22
#' Use the [`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 `TRUE`, the default style will be applied to the overlay.
24
24
#' By default, `enableDefaultOverlayStyle` is set to `TRUE`.
25
+
#' @param bpmnElementStyles a list of existing elements with their style to apply.
26
+
#' Use the [`create_shape_style`] or [`create_edge_style`] functions to create the style of 'BPMN' elements.
25
27
#' @param width A fixed width for the widget (in CSS units).
26
28
#' The default value is `NULL`, which results in intelligent automatic sizing based on the widget's container.
27
29
#' @param height A fixed height for the widget (in CSS units).
@@ -98,7 +100,50 @@
98
100
#' height='auto'
99
101
#' )
100
102
#'
101
-
#' @seealso [`create_overlay`] to create an overlay
103
+
#' # Example 5: Display the BPMN diagram featuring styling for BPMN elements
104
+
#' bpmnElementStyles <- list(
105
+
#' bpmnVisualizationR::create_shape_style(
106
+
#' elementIds = list("call_activity_1_1"),
107
+
#' stroke_color = 'RoyalBlue',
108
+
#' font_color = 'DarkOrange',
109
+
#' font_family = 'Arial',
110
+
#' font_size = 12,
111
+
#' font_bold = TRUE,
112
+
#' font_italic = TRUE,
113
+
#' font_strike_through = TRUE,
114
+
#' font_underline = TRUE,
115
+
#' opacity = 75,
116
+
#' fill_color = 'Yellow',
117
+
#' fill_opacity = 50
118
+
#' ),
119
+
#' bpmnVisualizationR::create_edge_style(
120
+
#' elementIds = list("sequence_flow_1_4"),
121
+
#' stroke_color = 'DeepPink',
122
+
#' stroke_width = 3,
123
+
#' stroke_opacity = 70,
124
+
#' font_color = 'ForestGreen',
125
+
#' font_family = 'Courier New',
126
+
#' font_size = 14,
127
+
#' font_bold = TRUE,
128
+
#' font_italic = TRUE,
129
+
#' font_strike_through = FALSE,
130
+
#' font_underline = FALSE,
131
+
#' font_opacity = 80,
132
+
#' opacity = 80
133
+
#' )
134
+
#' )
135
+
#'
136
+
#' bpmnVisualizationR::display(
137
+
#' bpmn_file,
138
+
#' bpmnElementStyles = bpmnElementStyles,
139
+
#' width='auto',
140
+
#' height='auto'
141
+
#' )
142
+
#'
143
+
#' @seealso
144
+
#' * [`create_overlay`] to create an overlay
145
+
#' * [`create_shape_style`] to create the structure style for the shape
146
+
#' * [`create_edge_style`] to create the structure style for the edge
0 commit comments