Skip to content

Commit

Permalink
slightly better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Oct 16, 2019
1 parent a723806 commit ed021e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/image-interact.R
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,12 @@ asNumber <- function(x, levels = NULL) {
# simplifyVector=FALSE, which means NA are replaced by NULL
# (because jsonlite::fromJSON('["a", "b", null]') -> list("a", "b", NULL))
#
# Thankfully, it doesn't seem like it meaningful for a limits to have an
# explicit NULL, so we simply treat NULL like NA.
# Thankfully, it doesn't seem like it's meaningful for limits to
# contains a NULL in the 1st place, so we simply treat NULL like NA.
# For more context, https://github.com/rstudio/shiny/issues/2666
fortifyDiscreteLimits <- function(coord) {
# Note that discrete_limits$x/y are populated iff
# x/y are discrete mappings
coord$domain$discrete_limits <- lapply(
coord$domain$discrete_limits,
function(var) {
Expand Down

0 comments on commit ed021e8

Please sign in to comment.