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
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
113 ↗ | (On Diff #2402) | The first letter has to be capital, no? |
117 ↗ | (On Diff #2402) | 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 Diff #2402) | { on new line. |
141 ↗ | (On Diff #2402) | Looks like a hack, couldn't we avoid it? |
214 ↗ | (On Diff #2402) | Useless brackets. |
240 ↗ | (On Diff #2402) | Useless brackets. |
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
189 ↗ | (On Diff #2406) | g_SelectedChart["category"] could be written as g_SelectedChart.category.[number]. The same for lines below. |