diff --git a/R/map_plugins.R b/R/map_plugins.R index be26a34..c8aa35d 100644 --- a/R/map_plugins.R +++ b/R/map_plugins.R @@ -66,7 +66,8 @@ addAntaresLegend <- function(map, htmlAreaColor = NULL, htmlAreaSize = NULL, show_legend = .getLabelLanguage("Show legend", language), hide_legend = .getLabelLanguage("Hide legend", language) ) - + + map %>% requireDep("antaresLegend") %>% invokeMethod(data=NULL, "addAntaresLegend", options) } @@ -90,6 +91,7 @@ updateAntaresLegend <- function(map, htmlAreaColor = NULL, htmlAreaSize = NULL, nullOpts <- sapply(options, is.null) options <- options[!nullOpts] + map %>% requireDep("antaresLegend") %>% invokeMethod(data=NULL, "updateAntaresLegend", options) } diff --git a/inst/leafletPlugins/antaresLegend.css b/inst/leafletPlugins/antaresLegend.css index 41a07a1..ae13f67 100644 --- a/inst/leafletPlugins/antaresLegend.css +++ b/inst/leafletPlugins/antaresLegend.css @@ -49,7 +49,7 @@ html, body { color: #999; padding-left:5px; font-size: 9px; - line-height: 14px; + height: 14px; } .legend svg .legend-label {