diff --git a/fec/fec/static/js/modules/data-map.js b/fec/fec/static/js/modules/data-map.js index 31eaf6a3aa..136af32acf 100644 --- a/fec/fec/static/js/modules/data-map.js +++ b/fec/fec/static/js/modules/data-map.js @@ -1,3 +1,5 @@ +/* eslint-disable no-undef */ + 'use strict'; /** @@ -537,3 +539,5 @@ function tooltipTemplate(obj) { module.exports = { DataMap }; + +/* eslint-enable no-undef */ diff --git a/fec/fec/static/js/widgets/pres-finance-map-box.js b/fec/fec/static/js/widgets/pres-finance-map-box.js index 4f3b65123e..4d66f79604 100644 --- a/fec/fec/static/js/widgets/pres-finance-map-box.js +++ b/fec/fec/static/js/widgets/pres-finance-map-box.js @@ -1,3 +1,6 @@ +/* eslint-disable no-undef */ +/* eslint-disable no-unused-vars */ + 'use strict'; /* global CustomEvent */ @@ -1171,27 +1174,28 @@ PresidentialFundsMap.prototype.handleExportRaisingClick = function(e) { eg: function openDownloads() VS. const openDownloads = function() */ - const openDownloads = function(){ - console.log('callback') - + const openDownloads = function() { + console.log('callback'); + $(instance.downloadsWrapper).animate( - { - height: $(instance.downloadsWrapper).get(0).scrollHeight - }, - 1000, - function() { - $(this).height('auto'); - }) - } + { + height: $(instance.downloadsWrapper).get(0).scrollHeight + }, + 1000, + function() { + $(this).height('auto'); + } + ); + }; // Wait until the export area is in view before opening window.onscroll = function() { var wS = this.scrollY, - hT = instance.downloadsWrapper.getBoundingClientRect().top + wS, - hH = instance.downloadsWrapper.offsetHeight, - wH = window.innerHeight; - if (wS > (hT+hH-wH)){ - openDownloads() + hT = instance.downloadsWrapper.getBoundingClientRect().top + wS, + hH = instance.downloadsWrapper.offsetHeight, + wH = window.innerHeight; + if (wS > hT + hH - wH) { + openDownloads(); } }; //scroll to export area @@ -1199,8 +1203,7 @@ PresidentialFundsMap.prototype.handleExportRaisingClick = function(e) { behavior: 'smooth', block: 'center', inline: 'nearest' - }); - + }); // TODO-done: show {selector_downloadsWrapper} // TODO-done: animate the page scroll to the downloads section @@ -1309,3 +1312,6 @@ function logUsage(candID, electionYear) { } new PresidentialFundsMap(); + +/* eslint-enable no-undef */ +/* eslint-enable no-unused-vars */