Type: | Package |
Title: | Drag and Drop Elements in 'Shiny' using 'Dragula Javascript Library' |
Version: | 0.3.1 |
Maintainer: | Zygmunt Zawadzki <zygmunt@zstat.pl> |
Description: | Move elements between containers in 'Shiny' without explicitly using 'JavaScript'. It can be used to build custom inputs or to change the positions of user interface elements like plots or tables. |
License: | GPL-2 |
LazyData: | TRUE |
Depends: | htmlwidgets, shiny |
Imports: | shinyjs |
RoxygenNote: | 6.0.1 |
Suggests: | covr, testthat |
BugReports: | https://github.com/zzawadz/dragulaR/issues |
URL: | https://dragular.zstat.pl/ |
NeedsCompilation: | no |
Packaged: | 2018-06-15 18:16:18 UTC; zzawadz |
Author: | Nicolas Bevacqua [aut, cph] (dragula library in htmlwidgets/lib, https://github.com/bevacqua/dragula), Zygmunt Zawadzki [aut, cre] (R interface) |
Repository: | CRAN |
Date/Publication: | 2018-06-17 14:08:01 UTC |
Register containers to dragula.
Description
Create dragula instace to allow moving around elements of the registered containers.
Usage
dragula(x, id = NULL)
Arguments
x |
vector of containers ids. Their's elements will become draggable. |
id |
input id to read from in shiny. |
Value
Return htmlWidget. Should be used only inside shiny ui.
Examples
if(interactive()) {
path <- system.file("apps/example01-dragula", package = "dragulaR")
runApp(path, display.mode = "showcase")
}
Dragula widget.
Description
Create dragula widget.
Usage
dragulaOutput(outputId)
renderDragula(expr, env = parent.frame(), quoted = FALSE)
Arguments
outputId |
output variable to read from. |
expr |
An expression that generates a dragula object. |
env |
The environment in which to evaluate |
quoted |
Is |
Value
RETURN_DESCRIPTION
Examples
if(interactive()) {
path <- system.file("apps/example02-input", package = "dragulaR")
runApp(path, display.mode = "showcase")
}
Format dragula input object.
Description
This is a utility function for better formatting dragula's input.
Usage
dragulaValue(x)
Arguments
x |
dragula input. |
Examples
## Not run:
# Example call:
dragulaValue(input$dragula)
## End(Not run)
Register dragulaR's js functions for refreshing dragula object.
Description
Register dragulaR's js functions for refreshing dragula object.
Usage
useDragulajs()
Examples
## Not run:
# See example for more details
library(dragulaR)
runApp(
system.file("apps/example05-dragula-dynamic-elements", package = "dragulaR"),
display.mode = "showcase")
## End(Not run)