diff --git a/R/funs.R b/R/funs.R index 6c44402..0b41a1a 100644 --- a/R/funs.R +++ b/R/funs.R @@ -3,7 +3,7 @@ #' @description #' To specify the position when creating an overlay object that will be attached to BPMN \code{Shape} elements in the diagram. #' -#' \code{overlay_shape_position} includes the following positions: +#' @section \code{overlay_shape_position} includes the following positions: #' #' - \code{"top-left"} #' - \code{"top-right"} @@ -14,8 +14,16 @@ #' - \code{"middle-left"} #' - \code{"middle-right"} #' +#' @details #' Use these constants as the \code{position} argument in the \code{\link{create_overlay}} function. #' +#' @examples +#' # Create an overlay at the top-left corner of a shape +#' overlay <- create_overlay(elementId = 1, label = "My label", position = overlay_shape_position[1]) +#' +#' @seealso +#' \code{\link{create_overlay}} +#' #' @export overlay_shape_position <- c( @@ -34,13 +42,21 @@ overlay_shape_position <- #' @description #' To specify the position when creating an overlay object that will be attached to BPMN \code{Edge} elements in the diagram. #' -#' \code{overlay_edge_position} includes the following positions: +#' @section \code{overlay_edge_position} includes the following positions: #' - \code{"start"} #' - \code{"end"} #' - \code{"middle"} #' +#' @details #' Use these constants as the \code{position} argument in the \code{\link{create_overlay}} function. -#' +#' +#' @examples +#' # Create an overlay at the starting point of an edge +#' overlay <- create_overlay(elementId = 1, label = "My label", position = overlay_edge_position[1]) +#' +#' @seealso +#' \code{\link{create_overlay}} +#' #' @export overlay_edge_position <- c("start", "end", "middle") diff --git a/man/create_overlay.Rd b/man/create_overlay.Rd index 9db9660..e9ef687 100644 --- a/man/create_overlay.Rd +++ b/man/create_overlay.Rd @@ -29,7 +29,7 @@ See the \code{overlays} argument in the \code{\link{display}} function. Use this function to create the correct overlay structure. } \examples{ -# Create an overlay with shape position "top-left" +# Example 1: Create an overlay with shape position "top-left" overlay_style <- create_overlay_style( font_color = 'DarkSlateGray', font_size = 23, @@ -44,7 +44,7 @@ overlay <- create_overlay( position = overlay_shape_position[1] ) -# Create an overlay with edge position "end" +# Example 2: Create an overlay with edge position "end" overlay_style <- create_overlay_style( font_color = 'DarkSlateGray', font_size = 23, diff --git a/man/create_overlay_style.Rd b/man/create_overlay_style.Rd index a4e6612..d5d2b68 100644 --- a/man/create_overlay_style.Rd +++ b/man/create_overlay_style.Rd @@ -12,13 +12,13 @@ create_overlay_style( ) } \arguments{ -\item{font_color}{The font color of the overlay. Use a custom color string.} +\item{font_color}{The font color of the overlay. Use all HTML color names or HEX codes.} -\item{font_size}{The font size of the overlay. Specify a numeric font size.} +\item{font_size}{The font size of the overlay. Specify a number in px.} -\item{fill_color}{The color of the background of the overlay. Use a custom color string.} +\item{fill_color}{The color of the background of the overlay. Use all HTML color names or HEX codes.} -\item{stroke_color}{The color of the stroke of the overlay. Use a custom color string. +\item{stroke_color}{The color of the stroke of the overlay. Use all HTML color names or HEX codes. If you don't want to display a stroke, you can set the color to: - \code{transparent}, - the same value as for the \code{fill_color}. This increases the \code{padding}/\code{margin}.} diff --git a/man/overlay_edge_position.Rd b/man/overlay_edge_position.Rd index c7909c9..8c27dcd 100644 --- a/man/overlay_edge_position.Rd +++ b/man/overlay_edge_position.Rd @@ -12,12 +12,23 @@ overlay_edge_position } \description{ To specify the position when creating an overlay object that will be attached to BPMN \code{Edge} elements in the diagram. +} +\details{ +Use these constants as the \code{position} argument in the \code{\link{create_overlay}} function. +} +\section{\code{overlay_edge_position} includes the following positions}{ -\code{overlay_edge_position} includes the following positions: - \code{"start"} - \code{"end"} - \code{"middle"} +} -Use these constants as the \code{position} argument in the \code{\link{create_overlay}} function. +\examples{ +# Create an overlay at the starting point of an edge +overlay <- create_overlay(elementId = 1, label = "My label", position = overlay_edge_position[1]) + +} +\seealso{ +\code{\link{create_overlay}} } \keyword{datasets} diff --git a/man/overlay_shape_position.Rd b/man/overlay_shape_position.Rd index e926387..c1588ed 100644 --- a/man/overlay_shape_position.Rd +++ b/man/overlay_shape_position.Rd @@ -12,8 +12,12 @@ overlay_shape_position } \description{ To specify the position when creating an overlay object that will be attached to BPMN \code{Shape} elements in the diagram. +} +\details{ +Use these constants as the \code{position} argument in the \code{\link{create_overlay}} function. +} +\section{\code{overlay_shape_position} includes the following positions}{ -\code{overlay_shape_position} includes the following positions: - \code{"top-left"} - \code{"top-right"} @@ -23,7 +27,14 @@ To specify the position when creating an overlay object that will be attached to - \code{"bottom-center"} - \code{"middle-left"} - \code{"middle-right"} +} -Use these constants as the \code{position} argument in the \code{\link{create_overlay}} function. +\examples{ +# Create an overlay at the top-left corner of a shape +overlay <- create_overlay(elementId = 1, label = "My label", position = overlay_shape_position[1]) + +} +\seealso{ +\code{\link{create_overlay}} } \keyword{datasets}