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
feat(style)!: refactor how to build the overlay style (#245)
BREAKING CHANGE: `create_font`, `create_fill` and `create_stroke` functions are internal functions. `create_style` has been renamed in `create_overlay_style`, and now, we use only this function to create the style of an overlay.
#' @param elementId The bpmn element id to which the overlay will be attached
48
77
#' @param label 'HTML' element to use as an overlay
49
78
#' @param style The style of the overlay.
50
-
#' Use \code{\link{create_style}} function to create the style object of an overlay and be aware of the `enableDefaultOverlayStyle` parameter in the \code{\link{display}} function.
79
+
#' Use \code{\link{create_overlay_style}} function to create the style object of an overlay and be aware of the `enableDefaultOverlayStyle` parameter in the \code{\link{display}} function.
51
80
#' @param position The position of the overlay
52
81
#' If the bpmn element where the overlay will be attached is a Shape, use \code{\link{overlay_shape_position}}.
53
82
#' Otherwise, use \code{\link{overlay_edge_position}}.
54
83
#'
55
84
#' @returns An overlay object
56
85
#'
57
86
#' @examples
58
-
#' # Create an overlay with shape position "top-left"
87
+
#' # Example 1: Create an overlay with shape position "top-left"
88
+
#' overlay_style <- create_overlay_style(
89
+
#' font_color = 'DarkSlateGray',
90
+
#' font_size = 23,
91
+
#' fill_color = 'MistyRose',
92
+
#' stroke_color = 'Red'
93
+
#' )
94
+
#'
59
95
#' overlay <- create_overlay(
60
-
#' "my-element-id",
61
-
#' "My Overlay Label",
62
-
#' create_style(
63
-
#' font = create_font(color = 'DarkSlateGray', size = 23),
64
-
#' fill = create_fill(color = 'MistyRose'),
65
-
#' stroke = create_stroke(color = 'Red')
66
-
#' ),
67
-
#' overlay_shape_position[1]
96
+
#' "my-shape-id",
97
+
#' "My Overlay Label",
98
+
#' style = overlay_style,
99
+
#' position = overlay_shape_position[1]
100
+
#' )
101
+
#'
102
+
#' # Example 2: Create an overlay with edge position "end"
103
+
#' overlay_style <- create_overlay_style(
104
+
#' font_color = 'DarkSlateGray',
105
+
#' font_size = 23,
106
+
#' fill_color = 'MistyRose',
107
+
#' stroke_color = 'Red'
68
108
#' )
69
109
#'
70
-
#' # Create an overlay with edge position "end"
71
110
#' overlay <- create_overlay(
72
-
#' "my-edge-id",
73
-
#' "My Overlay Label",
74
-
#' create_style(
75
-
#' font = create_font(color = 'DarkSlateGray', size = 23),
0 commit comments