Restore the selected charts options when switching tabs in the summary page. The user selection is always saved so that
when selecting the charts panel, they are loaded - initially 0. But when the user is changing the categories, we must reset the value/type selection to 0.
Details
Details
- Reviewers
vladislavbelov - Commits
- rP19757: Fix selected graphs in summary always reset, when switching tabs
- Trac Tickets
- #4555
1 Choose chart category, value, and/or type. Go to another panel and then back to charts, must have the same selection you made before. 2 Choose any chart category, the list of values and/or types must have the first item selected.
Diff Detail
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
113 | The first letter has to be capital, no? | |
117 | I think, it should have the same style with all file, upper case for the first word after g_. Also unnecessary indents. We've have already discussed with @elexis, that we've to avoid this, because if we'll add more lines, we need to add spaces for all of them. I think, it'd be better to use an object, like: var g_SelectedChart = { "caterogy": [0, 0], // ... }; | |
138 | { on new line. | |
141 | Looks like a hack, couldn't we avoid it? | |
214 | Useless brackets. | |
240 | Useless brackets. |
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
191 | g_SelectedChart["category"] could be written as g_SelectedChart.category.[number]. The same for lines below. |