Previously grid were put into the vuex store as arrays - this was troublesome for a few reasons, but one of the remaining debts from this is that nearly all grid modifications use Object.assign({}, grid, changes) to instantiate a fresh grid object. This was necessary when using arrays, as Vue cannot react to property addition or deletion, nor changes to objects inside arrays.
Now that we are using a proper matrix inside of the store, we don't need to worry about this. Each coordinate object is converted to a getter/setter during state transitions - the only time we need to worry is when we add new rows/columns, which generates new qs and rs. We can likely use Vue.set in those cases.
Previously
grid
were put into the vuex store as arrays - this was troublesome for a few reasons, but one of the remaining debts from this is that nearly all grid modifications useObject.assign({}, grid, changes)
to instantiate a fresh grid object. This was necessary when using arrays, as Vue cannot react to property addition or deletion, nor changes to objects inside arrays.Now that we are using a proper matrix inside of the store, we don't need to worry about this. Each coordinate object is converted to a getter/setter during state transitions - the only time we need to worry is when we add new rows/columns, which generates new
q
s andr
s. We can likely useVue.set
in those cases.