Skip to content

Commit

Permalink
Fix #104
Browse files Browse the repository at this point in the history
  • Loading branch information
LewisAJones committed Mar 11, 2024
1 parent af5a646 commit 02c78d1
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Encoding: UTF-8
LazyData: true
biocViews:
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Depends:
R (>= 4.0)
Imports:
Expand Down
3 changes: 3 additions & 0 deletions R/pick_phylopic.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ pick_phylopic <- function(name = NULL, n = 5, uuid = NULL, view = 1,
grid.newpage()
grid.picture(img)
# Add text for attribution
att <- att[[1]][[1]]
att_string <- paste0("Contributor: ", att$contributor, "\n",
"Created: ", att$created, "\n",
"Attribution: ", att$attribution, "\n",
"License: ", att$license)
grid.text(label = att_string,
x = 0.96, y = 0.92,
Expand Down Expand Up @@ -126,6 +128,7 @@ pick_phylopic <- function(name = NULL, n = 5, uuid = NULL, view = 1,
}
# Get attribution data
att <- lapply(uuids[[i]], get_attribution)
att <- lapply(att, function(x) x[[1]][[1]])
# Attribution text
n_spaces <- 3 + floor(log10(length(att) + 1))
att_string <- lapply(att, function(x) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 02c78d1

Please sign in to comment.