taborlab / Iris

The Light Program Interface
BSD 3-Clause "New" or "Revised" License
12 stars 2 forks source link

Clicking on a mode button triggers even if that mode is already selected #272

Closed BrianLandry closed 8 years ago

BrianLandry commented 8 years ago

Clicking on the current mode should have no result

BrianLandry commented 8 years ago

Also note that the input state is now solely stored in formData. This was create a single source of truth on the state stored in formData as opposed to two separate sources of truth for the state, one in $scope.inputStyle and one in the formData.

This is currently accessed with getInputStyle(), which simply wraps a function call to get the inputStyle from formData, getInputStyle() purpose is to decrease the amount of code required to access the state in the html.

SynbioLucas commented 8 years ago

This issue was caused by the very change mentioned by @BrianLandry above. The $scope.inputStyle variable state was previously checked before switching states. Brian's edit was not propagated to include this check.