Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ndtv/R/render.d3_animation.R
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ renderD3ScriptIncludes<-function(filename,ndtvD3BaseUrl,scriptType='embedded'){
<!-- minimized d3.js library -->
<script src='http://d3js.org/d3.v3.min.js' charset='utf-8'></script>
<!-- minimized jquery js library -->
<script src='http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'></script>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/4.0.0/jquery.min.js'></script>
<!-- d3.slider.js library -->
<script src='http://statnet.github.io/ndtv-d3/src/lib/d3.slider.js'></script>
<!-- ndtv-d3 js code -->
Expand Down
2 changes: 1 addition & 1 deletion ndtv/inst/htmlwidgets/ndtvAnimationWidget.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# (uncomment to add a dependency)
dependencies:
- name: jquery
version: 2.1.1
version: 4.0.0
src: javascript/ndtv-d3/src/lib/jquery/dist
script: jquery.min.js
- name: d3
Expand Down
8 changes: 4 additions & 4 deletions ndtv/inst/javascript/ndtv-d3/src/js/ndtv-d3.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ Greg Michalec, Skye Bender-deMoll, Martina Morris (2014) 'ndtv-d3: an HTML5 netw
n3.prototype.SVGSetup = function(domTarget) {
var n3 = this;

$(domTarget).resize(function(n) {
$(domTarget.node()).on('resize', function(n) {
n3.resizeGraph(n);
});
$(window).resize(function(n) {
$(window).on('resize', function(n) {
n3.resizeGraph(n);
});

Expand Down Expand Up @@ -561,7 +561,7 @@ Greg Michalec, Skye Bender-deMoll, Martina Morris (2014) 'ndtv-d3: an HTML5 netw
} else if (property == 'label' && sliceRenderData.graph.displaylabels) {
value = id;
}
if (value && $.type(value) === 'string' && value.match('rgba')) {
if (value && typeof value === 'string' && value.match('rgba')) {
var rgba = value.match(/^rgba\((.*), ?(.*)\)$/);
if (rgba) {
value = "rgb("+rgba[1]+")";
Expand Down Expand Up @@ -707,7 +707,7 @@ Greg Michalec, Skye Bender-deMoll, Martina Morris (2014) 'ndtv-d3: an HTML5 netw
var ratio = (hlen - offset) / hlen;

//If the ratio is invalid, just use the original coordinates
if ($.isNumeric(ratio)) {
if (Number.isFinite(ratio)) {
return [
pointA[0] + (xlen * ratio),
pointA[1] + (ylen * ratio)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2014 jQuery Foundation and other contributors
Copyright 2026 jQuery Foundation and other contributors
http://jquery.com/

Permission is hereby granted, free of charge, to any person obtaining
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.