Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misplaced tooltip text #135

Open
erstearns opened this issue Aug 30, 2023 · 0 comments
Open

Misplaced tooltip text #135

erstearns opened this issue Aug 30, 2023 · 0 comments

Comments

@erstearns
Copy link

I am having an issue with the position of the download size titles. They render in the correct location when I run my Shiny app locally, however when I publish the app on a remote server, the titles then render in a different location as depicted in the image below.

Here is my code for integrating easyPrint:

# ---- add legend & easy print ----
  observe({
    print("observe: add model input legend")
    leafletProxy("inputMap1") %>%
      clearControls() %>%    
      addEasyprint(options = easyprintOptions(
        title = 'Download map - select size',
        position = 'bottomleft',
        hideControlContainer = FALSE,
        exportOnly = TRUE,
        filename = paste0(paste(input$country, collapse = "_"), "_", input$sel_inputs[1]),
        tileLayer = "basemap",
        tileWait = 5000,
        defaultSizeTitles = list(
          "CurrentSize" = "Current map extent",
          "A4Landscape" = "A4 (Landscape) extent with w:1045, h:715",
          "A4Portrait" = "A4  (Portrait) extent with w:715, h:1045"
        ),
        # sizeModes = c("A4Portrait","A4Landscape"),
        sizeModes = list("CurrentSize" = "CurrentSize",
                         "A4Landscape" = "A4Landscape",
                         "A4Portrait" = "A4Portrait"
        ),
        customWindowTitle = "Input Map 1",
        customSpinnerClass = "shiny-spinner-placeholder",
        spinnerBgColor = "#b48484"))  %>%
      addLegend(pal = with(modinput1(), pal), 
                values = with(modinput1(), pal(values)),
                title = modinput1()$label,
                position = "bottomright",
                opacity = 0.99, #,
                 labFormat = function(type, cuts, p) {
                   n = length(cuts)
                   paste0(comma(round(cuts[-n], 2)), " – ", comma(round(cuts[-1], 2)))
                 }
      )
    
  })

MisplacedTooltipText

Any help resolving this issue is much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant