ArgoCanada / argoFloats

Tools for analyzing collections of oceanographic Argo floats
https://argocanada.github.io/argoFloats/index.html
17 stars 7 forks source link

how to cursor from arrow to circle? #553

Closed dankelley closed 2 years ago

dankelley commented 2 years ago

@j-harbin do you know how to do that? It would be quite nice, for QC things where a person wants to indicate a point. Somehow, my brain finds it easier to encircle a data point with a cursor, as opposed to putting the thin end of an arrow icon at the point.

Feel free to close this, if you don't know and don't want to find out. (Or if the solution involves some fancy storage of icon image files somewhere in a css directory or whatever.)

dankelley commented 2 years ago

I think this might be quite hard. @j-harbin feel free to close this issue, if you've looked into it and don't see a solution. I suppose it doesn't hurt to have it open, but we both likely have it in our heads to do this in some of our shiny apps, if we ever happen to see the method.

j-harbin commented 2 years ago

Dan, the following code changes the cursor to a "crosshair" when hovering over a widget. This code was inspired from https://stackoverflow.com/questions/53506514/set-image-as-cursor-in-r-shiny. I know you wanted a circle and not a crosshair, but this tells me that it would be quite easy.

library(shiny)

csscode <- HTML("
#messagebutton {  
  cursor: crosshair;
}
")

ui  <- fluidPage(    
    tags$head(tags$style(csscode)),
    actionButton(inputId = 'messagebutton', label = 'click me')
)

server <- function(input, output, session) {}

shinyApp(ui = ui, server = server)
dankelley commented 2 years ago

omygod that is COOL

j-harbin commented 2 years ago

Based on the video @dankelley sent via email, I know he had incorporated this into his tagging app. I will close this issue (breaking argoFloats rules :) )