Skip to content

Commit

Permalink
Fix #306
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Jan 18, 2024
1 parent bdb7e39 commit 1b970b5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
that mark completely while still drawing the mark
* Fix a bug in `geom_mark_rect()` where the mark would not be shown in all
panels (#307)
* Fixed a bug in the `geom_mark_*()` geoms where having `NA` values in the
`filter` aesthetic would lead to weird errors. `NA` is now treated as `FALSE`
(#306)

# ggforce 0.4.1

Expand Down
1 change: 1 addition & 0 deletions R/mark_circle.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ NULL
GeomMarkCircle <- ggproto('GeomMarkCircle', GeomShape,
setup_data = function(self, data, params) {
if (!is.null(data$filter)) {
data$filter <- ifelse(is.na(data$filter), FALSE, data$filter)
self$removed <- data[!data$filter, c('x', 'y', 'PANEL')]
data <- data[data$filter, ]
}
Expand Down
1 change: 1 addition & 0 deletions R/mark_rect.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ NULL
GeomMarkRect <- ggproto('GeomMarkRect', GeomMarkCircle,
setup_data = function(self, data, params) {
if (!is.null(data$filter)) {
data$filter <- ifelse(is.na(data$filter), FALSE, data$filter)
self$removed <- data[!data$filter, c('x', 'y', 'PANEL')]
data <- data[data$filter, ]
}
Expand Down

0 comments on commit 1b970b5

Please sign in to comment.