Skip to content

Commit

Permalink
Fix #251 remove placeholder correctly from static layers with late eval
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Jan 2, 2019
1 parent 1f3e431 commit 5448d6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions R/transition-.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Transition <- ggproto('Transition', NULL,
map_data = function(self, data, params, replace = FALSE) {
if (is.null(params$row_id)) return(data)
Map(function(d, id) {
if (length(id) > 0) {
d$group <- if (replace) {
stri_replace(d$group, paste0('<', id, '>'), regex = '<.*>')
} else {
paste0(d$group, '<', id, '>')
}
if (length(id) == 0 && !replace) return(d)
id <- if (length(id) > 0) paste0('<', id, '>') else ''
d$group <- if (replace) {
stri_replace(d$group, id, regex = '<.*>')
} else {
paste0(d$group, id)
}
d
}, d = data, id = params$row_id)
Expand Down

0 comments on commit 5448d6e

Please sign in to comment.