create_overlay {bpmnVisualizationR}R Documentation

Create an overlay

Description

An overlay can be added to existing elements in the diagram.

See the overlays argument in the display function.

Use this function to create the correct overlay structure.

Usage

create_overlay(elementId, label, style = NULL, position = NULL)

Arguments

elementId

The bpmn element id to which the overlay will be attached

label

'HTML' element to use as an overlay

style

The style of the overlay. Use create_overlay_style function to create the style object of an overlay and be aware of the enableDefaultOverlayStyle parameter in the display function.

position

The position of the overlay If the bpmn element where the overlay will be attached is a Shape, use overlay_shape_position. Otherwise, use overlay_edge_position.

Value

An overlay object

Examples

# Example 1: Create an overlay with shape position "top-left"
overlay_style <- create_overlay_style(
  font_color = 'DarkSlateGray',
  font_size = 23,
  fill_color = 'MistyRose',
  stroke_color = 'Red'
)

overlay <- create_overlay(
  "my-shape-id",
  "My Overlay Label",
  style = overlay_style,
  position = overlay_shape_position[1]
)

# Example 2: Create an overlay with edge position "end"
overlay_style <- create_overlay_style(
  font_color = 'DarkSlateGray',
  font_size = 23,
  fill_color = 'MistyRose',
  stroke_color = 'Red'
)

overlay <- create_overlay(
  "my-edge-id",
  "My Overlay Label",
  style = overlay_style,
  position = overlay_edge_position[2]
)


[Package bpmnVisualizationR version 0.5.0 Index]