Closed markgrujic closed 3 years ago
Thanks for reporting that.
I just updated the package to version 3.2.0
. The arguments width
and height
never did anything, I should have removed them earlier on. The issue comes from changing the width
of the original image. In the new version at least, the code below works.
library(shiny)
library(tippy)
shinyApp(
ui = fluidPage(
tippy(text = "<b>Text</b>",
allowHTML = TRUE,
interactive = TRUE,
tooltip = paste(img(src="http://tippy.john-coene.com/logo.png")),
placement = "right",
arrow = TRUE,
theme = "light"
)
),
server = function(input, output) {}
)
Great! The size is now working perfectly. Super minor point, but the tooltip margin doesn't encompass the content.
Thanks for the updates
This is now doable on the latest version, sorry it took so long to fix.
library(shiny)
library(tippy)
shinyApp(
ui = fluidPage(
tippy("<b>Text</b>",
allowHTML = T,
interactive = T,
content = paste(
img(
src="http://tippy.john-coene.com/logo.png",
height="200px",
)
),
placement = "right",
arrow = T,
maxWidth = 600 # this doesn't appear to do anything
)
),
server = function(input, output) {}
)
Hi, Thanks for the work on this package, it's really great!
I'm trying to set the height and width of the tooltip so that it encompasses all the content. The width of the tooltip seems to be determined based off the height of the tooltip that fits the content at "100%"
Running that snippet, you can see that the tooltip height is good but the width is short. Changing the height and width arguments inside the img() function to 100% fix the out-of-tooltip issue, but the tooltip is a fixed size and the image is forced to be that size.
Is there a way to change the size of the tooltip? The size argument doesn't seem to work either, however it does something:
Cheers