Skip to content

Commit

Permalink
Merge 3171475 into 99f3991
Browse files Browse the repository at this point in the history
  • Loading branch information
anselmbradford committed Oct 25, 2017
2 parents 99f3991 + 3171475 commit 90756df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions cfgov/unprocessed/js/apps/owning-a-home/ratings-form.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';


/**
* Initialize the ratings form for Owning a Home.
*/
function init() {
const ratingsForm = document.querySelector( '.oah-ratings-form' );
const ratingsInputs = ratingsForm.querySelectorAll( '.rating-inputs input' );
Expand All @@ -9,13 +11,17 @@ function init() {
const feedBackLinkHref = feedBackLinkElement.getAttribute( 'href' );
const ratingsMsgElement = ratingsForm.querySelector( '.rating-message' );

function _onChange( e ) {
/**
* Handle a change of the rating inputs.
* @param {Event} event - The onChange event object.
*/
function _onChange( event ) {
ratingsMsgElement.classList.add( 'visible' );

if ( feedBackLinkHref ) {
feedBackLinkElement.setAttribute(
'href',
feedBackLinkHref + '?is_helpful=' + e.target.value
feedBackLinkHref + '?is_helpful=' + event.target.value
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ MortgagePerformanceMap.prototype.renderChart = function( prevState, state ) {
this.chart.highchart.chart.mapZoom( zoomLevel );
}
if ( state.zoomTarget ) {
let centroid = utils.stateCentroids[state.zoomTarget];
const centroid = utils.stateCentroids[state.zoomTarget];
this.chart.highchart.chart.mapZoom();
utils.setZoomLevel( 10 );
zoomLevel = utils.getZoomLevel( 5 );
Expand Down

0 comments on commit 90756df

Please sign in to comment.