Skip to content

Commit

Permalink
allow ... for antpath for pane
Browse files Browse the repository at this point in the history
  • Loading branch information
trafficonese committed Oct 3, 2023
1 parent 126d14e commit b5e0283
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 14 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Suggests:
curl
URL: https://trafficonese.github.io/leaflet.extras2/, https://github.com/trafficonese/leaflet.extras2
BugReports: https://github.com/trafficonese/leaflet.extras2/issues
RoxygenNote: 7.2.0
RoxygenNote: 7.2.3
6 changes: 4 additions & 2 deletions R/antpath.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ antpathOptions = function(
pulseColor = "#ffffff",
lineCap = NULL, lineJoin = NULL,
interactive = TRUE, pointerEvents = NULL,
className = "") {
className = "",
...) {

filterNULL(list(
delay = delay,
Expand All @@ -93,7 +94,8 @@ antpathOptions = function(
lineJoin = lineJoin,
interactive = interactive,
pointerEvents = pointerEvents,
className = className
className = className,
...
))
}

Expand Down
7 changes: 4 additions & 3 deletions inst/examples/antpath_app.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ui <- fluidPage(
server <- function(input, output, session) {
output$map <- renderLeaflet({
leaflet() %>%
addTiles() %>%
addTiles() %>% addMapPane("my-pane", 420) %>%
addAntpath(data = coords,
layerId = ~FGN,
label = ~sprintf("Ant-Colony of %s", district),
Expand All @@ -32,10 +32,11 @@ server <- function(input, output, session) {
options = antpathOptions(
pulseColor = colorNumeric("Reds",
domain = as.numeric(coords$FKN))(as.numeric(coords$FKN)),
delay = c(rep(300, 50), rep(3000, 50)),
delay = 4000,
paused = FALSE,
renderer= JS('L.svg({pane: "my-pane"})'),
reverse = TRUE,
dashArray = c(40, 50),
dashArray = c(40, 10),
hardwareAccelerated = T,
interactive = TRUE,
lineCap = "butt",
Expand Down
5 changes: 4 additions & 1 deletion man/antpathOptions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions man/startMoving.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"d3-hexbin": "^0.2.2",
"labelgun": "^6.1.0",
"leaflet": "^1.6.0",
"leaflet-ant-path": "^1.3.0",
"leaflet-arrowheads": "^1.4.0",
"leaflet-easyprint": "^2.1.9",
"leaflet-geometryutil": "^0.10.1",
Expand Down

0 comments on commit b5e0283

Please sign in to comment.