diff --git a/R/compose-.R b/R/compose-.R index c76f839..ad0d898 100644 --- a/R/compose-.R +++ b/R/compose-.R @@ -100,7 +100,7 @@ Compose <- ggproto( params$title <- title } params$guide_params <- guide_params - params$hash <- hash(guide_params) + params$hash <- hash(lapply(guide_params, get_hash)) params }, @@ -217,3 +217,5 @@ set_limits <- function(params, limits) { params$limits <- limits params } + +get_hash <- function(x) x$hash diff --git a/R/primitive-line.R b/R/primitive-line.R index 8ba0f65..c114130 100644 --- a/R/primitive-line.R +++ b/R/primitive-line.R @@ -80,7 +80,7 @@ PrimitiveLine <- ggproto( legend = list(line = "legend.axis.line") ), - hashables = exprs(decor), + hashables = exprs(decor[[aesthetic]], get0("position")), extract_key = standard_extract_key, diff --git a/R/primitive-ticks.R b/R/primitive-ticks.R index e35c7d7..f83a7b1 100644 --- a/R/primitive-ticks.R +++ b/R/primitive-ticks.R @@ -84,7 +84,7 @@ PrimitiveTicks <- ggproto( params = new_params(key = NULL, bidi = FALSE), - hashables = exprs(key), + hashables = exprs(key$.value), elements = list( position = list(