Browse Source

updated javascript to make sure it only loads once even when logged in

master
Paul Pound 8 years ago
parent
commit
5661931e4e
  1. 3
      js/fdg.js

3
js/fdg.js

@ -1,5 +1,7 @@
Drupal.behaviors.islandora_herbarium_object_graph = { Drupal.behaviors.islandora_herbarium_object_graph = {
attach: function (context, settings) { attach: function (context, settings) {
// only run once:
if (context == document) {
var svg = d3.select(".fdg"), var svg = d3.select(".fdg"),
width = +svg.attr("width"), width = +svg.attr("width"),
height = +svg.attr("height"); height = +svg.attr("height");
@ -126,3 +128,4 @@ Drupal.behaviors.islandora_herbarium_object_graph = {
} }
} }
} }
}

Loading…
Cancel
Save