Skip to content

Commit

Permalink
starting convert to packer
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Dec 22, 2021
1 parent 4aab9e5 commit d337e9b
Show file tree
Hide file tree
Showing 20 changed files with 2,582 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
^LICENSE\.md$
examples/
^\.github$
^srcjs$
^node_modules$
^package\.json$
^package-lock\.json$
^webpack\.dev\.js$
^webpack\.prod\.js$
^webpack\.common\.js$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.Ruserdata
*.Rproj
inst/doc
node_modules
2 changes: 0 additions & 2 deletions R/capture.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ capture <- function(selector,
`data-inputId` = inputId,
...
),
html_dependency_filesaver(),
html_dependency_domtoimage(),
html_dependency_capture()
)
}
Expand Down
4 changes: 2 additions & 2 deletions R/dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ html_dependency_capture <- function() {
htmlDependency(
name = "capture",
version = "0.1.0",
src = list(file = "assets"),
src = list(file = "packer"),
package = "capture",
script = "js/capture.js"
script = "capture-img.js"
)
}

Expand Down
10 changes: 5 additions & 5 deletions examples/default.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ ui <- fluidPage(
),
capture(
selector = "#result-block",
filename = "results",
filename = "results-screenshot",
icon("camera"), "Take screenshot of results",
options = list(bgcolor = "#FFF")
options = list(backgroundColor = "#FFF")
),
capture(
selector = "#result-block",
filename = "results",
filename = "results-screenshot",
icon("camera"), "Take screenshot of results (bigger scale)",
scale = 3,
options = list(bgcolor = "#FFF")
options = list(backgroundColor = "#FFF")
),
capture(
selector = "#result-block",
filename = NULL, # no download client side
icon("camera"), "Take screenshot of results (retrieve server side)",
inputId = "screenshot",
options = list(bgcolor = "#FFF")
options = list(backgroundColor = "#FFF")
),
uiOutput("out")
)
Expand Down
2 changes: 2 additions & 0 deletions inst/packer/capture-img.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions inst/packer/capture-img.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit d337e9b

Please sign in to comment.