diff --git a/src/store/block.module.js b/src/store/block.module.js index eaaae0a3..3e0d5b31 100644 --- a/src/store/block.module.js +++ b/src/store/block.module.js @@ -120,10 +120,10 @@ const actions = { console.log(chartSpace) // Example chartSpace: chart_29 // As a generalization, the first part of whatever is the input of store.commit determines where it goes. Check src/store - // Example: store.commit('chart_`) will go to src\store\chart.module.js, + // Example: store.commit('chart_`) will go to src\store\chart.module.js, // store.commit('map/') will go to src\store\map.module.js - - // Example: store.commit(chartSpace/building) > search "buildings" in "mutations" section (I think), in chart.module file + + // Example: store.commit(chartSpace/building) > search "buildings" in "mutations" section, in chart.module file // Mutations = change store value, getters = retrieve value. https://vuex.vuejs.org/guide/mutations store.commit(chartSpace + '/building', this.getters['map/meterGroup'](chart.meters).building) store.commit(chartSpace + '/meterGroupPath', this.getters['map/meterGroup'](chart.meters).path) diff --git a/src/store/chart.module.js b/src/store/chart.module.js index fb21dfe0..3e725f20 100644 --- a/src/store/chart.module.js +++ b/src/store/chart.module.js @@ -147,6 +147,9 @@ const mutations = { }, building (state, building) { + // example call triggered from block.module.js's updateCharts() + // commented out for now as this triggers many times + // console.log(building) state.building = building },