Skip to content

Commit

Permalink
Merge pull request #154 from biplab-sutradhar/bugfix/issue-123
Browse files Browse the repository at this point in the history
Updated animist.js to use class for source links, fixing unique ID is…
  • Loading branch information
tdhock authored Oct 11, 2024
2 parents 5842300 + e165511 commit de279d1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Package: animint2
Title: Animated Interactive Grammar of Graphics
Version: 2024.9.18
Version: 2024.10.11
URL: https://animint.github.io/animint2/
BugReports: https://github.com/animint/animint2/issues
Authors@R: c(
person("Toby", "Hocking",
email="[email protected]",
role=c("aut", "cre"),
comment="Original animint code"),
person("Biplab", "Sutradhar",
role = "ctb",
comment = "Updated animist.js to use class for source links"),
person("Hadley", "Wickham",
role=c("aut"),
comment="Forked ggplot2 code"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Changes in version 2024.10.10 (PR#154)

- Updated `animist.js` to use classes for source links, resolving issue #145.

# Changes in version 2024.9.18 (PR#131)

- Added functionality to capture screenshot in animint2pages
Expand Down
2 changes: 1 addition & 1 deletion inst/htmljs/animint.js
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,7 @@ var animint = function (to_select, json_file) {
////////////////////////////////////////////
if(response.hasOwnProperty("source")){
widget_td.append("a")
.attr("id","a_source_href")
.attr("class","a_source_href")
.attr("href", response.source)
.text("source");
}
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-renderer2-widerect.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
acontext("geom_widerect")
library(animint2)
expect_source <- function(expected){
a.list <- getNodeSet(info$html, '//a[@id="a_source_href"]')
a.list <- getNodeSet(info$html, '//a[@class="a_source_href"]')
computed <- if(length(a.list)==0){
NULL
}else{
Expand Down

0 comments on commit de279d1

Please sign in to comment.