daattali / timevis

📅 Create interactive timeline visualizations in R
http://daattali.com/shiny/timevis-demo/
Other
653 stars 157 forks source link

jquery and bootstrap dependencies loaded when not needed #24

Closed emillykkejensen closed 7 years ago

emillykkejensen commented 7 years ago

In timevis() jquery and bootstrap are loaded into the head section (line 346-349 & 359) - however that conflicts with my site and I would like to be able to not load it and set 'dependencies = NULL'. I'm thinking that it would only take an extra argument to the timevis() function like:

timevis <- function(data, groups, showZoom = TRUE, zoomFactor = 0.5, fit = TRUE, options, width = NULL, height = NULL, elementId = NULL, loaddependencies = TRUE)

Line 346: deps <- if(loaddependencies) {list( rmarkdown::html_dependency_jquery(), rmarkdown::html_dependency_bootstrap("default") )} else NULL

Then it don't load the default jquery and bootstrap libraries.

daattali commented 7 years ago

Could you submit a PR for that?

I'd make the param name camelCase

emillykkejensen commented 7 years ago

Here you go: #25

daattali commented 7 years ago

closing since PR exists