Skip to content

Commit

Permalink
add list method
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Oct 8, 2024
1 parent e8939ad commit a5d4a13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ S3method(layout_stack_add,HeatmapLayout)
S3method(layout_stack_add,default)
S3method(layout_stack_add,ggplot)
S3method(layout_stack_add,heatmap_active)
S3method(layout_stack_add,list)
S3method(layout_stack_add,stack_active)
S3method(layout_stack_and_add,default)
S3method(layout_stack_and_add,ggplot)
Expand Down
8 changes: 8 additions & 0 deletions R/layout-stack-add.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ layout_stack_add.HeatmapLayout <- function(object, stack, object_name) {
stack
}

#' @export
layout_stack_add.list <- function(object, stack, object_name) {
for (o in object) {
stack <- layout_stack_add(o, stack, object_name)
}
stack
}

#' @export
layout_stack_add.ggplot <- function(object, stack, object_name) {
cli::cli_abort(c(
Expand Down

0 comments on commit a5d4a13

Please sign in to comment.