overthesun / simoc-web

This is the web interface to SIMOC
https://ngs.simoc.space/
Other
3 stars 0 forks source link

Add a resetValues action in dashboard.js #2

Closed ezio-melotti closed 5 years ago

ezio-melotti commented 5 years ago

Add a resetValues action in dashboard.js: https://github.com/kstaats/simoc-web/blob/14263e264194496953bbeabca44c22b126c4ab7f/src/store/modules/dashboard.js#L179-L180

This function should restore all the values defined in https://github.com/kstaats/simoc-web/blob/14263e264194496953bbeabca44c22b126c4ab7f/src/store/modules/dashboard.js#L27-L56

It should be called from https://github.com/kstaats/simoc-web/blob/14263e264194496953bbeabca44c22b126c4ab7f/src/views/DashboardView.vue#L13-L32

to replace all the this.SET* calls and to initialize a new simulation.

ezio-melotti commented 5 years ago

This fixes the problem of the values not being properly reset when starting a new simulation, but still leaves all the this.SET* calls. The SET* methods can't be called directly from other mutations/actions in the store, so a different approach should be found. Since #45 fixes the main issue, I'm going to close this.