Skip to content
Snippets Groups Projects
Commit ba97efd9 authored by Yan, Andrew N.'s avatar Yan, Andrew N.
Browse files

refine event triggering

parent 6a15b369
No related branches found
No related tags found
No related merge requests found
......@@ -276,7 +276,10 @@ const controlLastYearSelect = function(elem, {variable, availableTimeseries}) {
const variableTimeseries = availableVariableTimeseries.map(x => x.slice(1));
const compareTimeseriesCountVals = variableTimeseries.map(x => x.map(y => y.compareTimeseriesCount));
if (compareTimeseriesCountVals.reduce((a, b) => Number(a) + Number(b), 0) === 0) {
checkbox.property('disabled', true);
checkbox
.property('disabled', true)
.property('checked', false)
.dispatch('change'); // trigger a change event
} else {
checkbox.property('disabled', false);
}
......@@ -376,6 +379,7 @@ const attachToNode = function (store, node, {siteno} = {}) {
}
store.dispatch(Actions.resizeUI(window.innerWidth, node.offsetWidth));
select(node)
.call(provide(store))
.call(timeSeriesGraph)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment