-
Notifications
You must be signed in to change notification settings - Fork 1
feat: added button for global min/max toggle, fixes #74 #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just looked at the code so far.
index.html
Outdated
@@ -33,6 +33,10 @@ | |||
<img class="navimg" src="img/icons/file-earmark-arrow-down.svg"/> | |||
Export | |||
</button> | |||
<label class="btn btn-outline-primary"> | |||
<input type="checkbox" id='checkbox_min_max' checked=true v-on:click="toggleMinMaxButtonClicked"> min/avg/max |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since, avg is always shown with this button, we can remove it from the description text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The glue between the checkbox element and the JS code should probably be v-model
or v-bind
. I'm just not sure how this can deal gracefully with the intermediate state (see vuejs/vue#4094).
getMetricDrawState (metricName) { | ||
for (const metricBase in this.state.allMetrics) { | ||
const metricArray = [] | ||
if (this.state.allMetrics[metricBase].name === metricName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really need a better way to get a metric by name other than looping through all metrics... But I guess this is a different refactoring issue.
The global toggle is very good already. However, we didn't really think about showing only min or mix without the other as we currently only have the min-to-max band. I think in the |
Oddly, the global toggle field is not vertically aligned with the other global buttons in my browser (both chromium and firefox). |
Fixed |
fixed |
is now 'only avg' while global is indeterminate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to stick to the v-model if possible. Create concrete example where it doesn't work as expected (in both directions) and consult with @kinnarr .
cdc5a44
to
76260d3
Compare
No description provided.