Skip to content

Commit 68b074e

Browse files
authored
Remove window.location.hash parsing code (#282)
1 parent ddb3e1f commit 68b074e

File tree

4 files changed

+5
-108
lines changed

4 files changed

+5
-108
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: animint2
22
Title: Animated Interactive Grammar of Graphics
3-
Version: 2025.12.2
3+
Version: 2025.12.3
44
URL: https://animint.github.io/animint2
55
BugReports: https://github.com/animint/animint2/issues
66
Authors@R: c(

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Changes in version 2025.12.3 (PR#282)
2+
3+
- URL hash handling: Removed old `window.location.hash` parsing code from `animint.js` (issue #280).
4+
15
# Changes in version 2025.12.2 (PR#283)
26

37
- `update_axes`: Fixed issue #281 where plots did not render in Rmd.

inst/htmljs/animint.js

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,52 +2750,5 @@ var animint = function (to_select, json_file) {
27502750
status_array=status_array.slice(1)
27512751
return status_array.every(function(elem){ return elem === "displayed"});
27522752
}
2753-
if(window.location.hash) {
2754-
var fragment=window.location.hash;
2755-
fragment=fragment.slice(1);
2756-
fragment=decodeURI(fragment)
2757-
var frag_array=fragment.split(/(.*?})/);
2758-
frag_array=frag_array.filter(function(x){ return x!=""})
2759-
frag_array.forEach(function(selector_string){
2760-
var selector_hash=selector_string.split("=");
2761-
var selector_nam=selector_hash[0];
2762-
var selector_values=selector_hash[1];
2763-
var re = /\{(.*?)\}/;
2764-
selector_values = re.exec(selector_values)[1];
2765-
var array_values = selector_values.split(',');
2766-
if(Selectors.hasOwnProperty(selector_nam)){
2767-
var s_info = Selectors[selector_nam]
2768-
if(s_info.type=="single"){//TODO fix
2769-
array_values.forEach(function(element) {
2770-
wait_until_then(100, check_func, update_selector,selector_nam,element)
2771-
if(response.time)Animation.pause(true)
2772-
});
2773-
}else{
2774-
var old_selections = Selectors[selector_nam].selected;
2775-
// the levels that need to have selections turned on
2776-
array_values
2777-
.filter(function(n) {
2778-
return old_selections.indexOf(n) == -1;
2779-
})
2780-
.forEach(function(element) {
2781-
wait_until_then(100, check_func, update_selector,selector_nam,element)
2782-
if(response.time){
2783-
Animation.pause(true)
2784-
}
2785-
});
2786-
old_selections
2787-
.filter(function(n) {
2788-
return array_values.indexOf(n) == -1;
2789-
})
2790-
.forEach(function(element) {
2791-
wait_until_then(100, check_func, update_selector,selector_nam,element)
2792-
if(response.time){
2793-
Animation.pause(true)
2794-
}
2795-
});
2796-
}//if(single) else multiple selection
2797-
}//if(Selectors.hasOwnProperty(selector_nam))
2798-
})//frag_array.forEach
2799-
}//if(window.location.hash)
28002753
});
28012754
};

tests/testthat/test-renderer1-url-fragment.R

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)