Last active
April 25, 2018 06:33
-
-
Save induprasad/13802df0ead0f1b147a03ad18fc1617f to your computer and use it in GitHub Desktop.
Controller of the LCMP_Strike component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
//Function called on Init | |
onInit: function (component, event, helper) { | |
var data = component.get("v.data"); | |
component.set('v.scriptsLoaded', true); | |
component.set('v.triggerRedraw', !component.get('v.triggerRedraw')); | |
component.resize = $A.getCallback(function () { | |
if (component.isValid()) { | |
component.set('v.fontSize', helper.determineFontSize(component.get('v.containerWidth'))); | |
component.set('v.chartRendered', false); | |
component.set('v.triggerRedraw', !component.get('v.triggerRedraw')); | |
} else { | |
window.removeEventListener('resize', component.resize); | |
} | |
}); | |
window.addEventListener('resize', component.resize, true); | |
}, | |
//Function which sets the spinner to false after chart is loaded | |
reRenderCharts: function (component, event, helper) { | |
component.set('v.chartRendered', false); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment