Skip to content

Commit 41db251

Browse files
committed
Update the documentation for the overlay position
1 parent 62d9663 commit 41db251

File tree

5 files changed

+80
-36
lines changed

5 files changed

+80
-36
lines changed

R/funs.R

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,27 @@
33
#' @description
44
#' To specify the position when creating an overlay object that will be attached to BPMN \code{Shape} elements in the diagram.
55
#'
6-
#' \code{overlay_shape_position} includes the following positions:
6+
#' @section Positions:
7+
#' \describe{
8+
#' \item{\code{"top-left"}}
9+
#' \item{\code{"top-right"}}
10+
#' \item{\code{"top-center"}}
11+
#' \item{\code{"bottom-left"}}
12+
#' \item{\code{"bottom-right"}}
13+
#' \item{\code{"bottom-center"}}
14+
#' \item{\code{"middle-left"}}
15+
#' \item{\code{"middle-right"}}
16+
#' }
17+
#'
18+
#' @details
19+
#' Use these constants as the \code{position} argument in the \code{\link{create_overlay}} function.
720
#'
8-
#' - \code{"top-left"}
9-
#' - \code{"top-right"}
10-
#' - \code{"top-center"}
11-
#' - \code{"bottom-left"}
12-
#' - \code{"bottom-right"}
13-
#' - \code{"bottom-center"}
14-
#' - \code{"middle-left"}
15-
#' - \code{"middle-right"}
21+
#' @examples
22+
#' # Create an overlay at the top-left corner of a shape
23+
#' overlay <- create_overlay(elementId = 1, label = "My label", position = overlay_shape_position[1])
1624
#'
17-
#' Use these constants as the \code{position} argument in the \code{\link{create_overlay}} function.
25+
#' @seealso
26+
#' \code{\link{create_overlay}}
1827
#'
1928
#' @export
2029
overlay_shape_position <-
@@ -34,13 +43,23 @@ overlay_shape_position <-
3443
#' @description
3544
#' To specify the position when creating an overlay object that will be attached to BPMN \code{Edge} elements in the diagram.
3645
#'
37-
#' \code{overlay_edge_position} includes the following positions:
38-
#' - \code{"start"}
39-
#' - \code{"end"}
40-
#' - \code{"middle"}
46+
#' @section Positions:
47+
#' \describe{
48+
#' \item{\code{"start"}}
49+
#' \item{\code{"middle"}}
50+
#' \item{\code{"end"}}
51+
#' }
4152
#'
53+
#' @details
4254
#' Use these constants as the \code{position} argument in the \code{\link{create_overlay}} function.
43-
#'
55+
#'
56+
#' @examples
57+
#' # Create an overlay at the starting point of an edge
58+
#' overlay <- create_overlay(elementId = 1, label = "My label", position = overlay_edge_position[1])
59+
#'
60+
#' @seealso
61+
#' \code{\link{create_overlay}}
62+
#'
4463
#' @export
4564
overlay_edge_position <- c("start", "end", "middle")
4665

man/create_overlay.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/create_overlay_style.Rd

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/overlay_edge_position.Rd

Lines changed: 18 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/overlay_shape_position.Rd

Lines changed: 22 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)