metrics-on-canvas review feedback updates.

- Refactor some things.
- Fixes heptagon moc rendering
- Experiment w/ duller colors.
This commit is contained in:
Simon Howe
2016-04-04 21:02:30 +02:00
parent 4a840c2d2b
commit 4ec8b97fef
15 changed files with 211 additions and 159 deletions
+3 -4
View File
@@ -21,14 +21,14 @@ export function selectMetric(metricId) {
}
export function pinNextMetric(delta) {
const metrics = AppStore.getAvailableCanvasMetrics().map(m => m.id);
const metrics = AppStore.getAvailableCanvasMetrics().map(m => m.get('id'));
const currentIndex = metrics.indexOf(AppStore.getSelectedMetric());
const nextMetric = metrics[modulo(currentIndex + delta, metrics.length)];
const nextIndex = modulo(currentIndex + delta, metrics.count());
const nextMetric = metrics.get(nextIndex);
AppDispatcher.dispatch({
type: ActionTypes.PIN_METRIC,
metricId: nextMetric,
metricType: AppStore.getAvailableCanvasMetricsTypes()[nextMetric]
});
updateRoute();
}
@@ -37,7 +37,6 @@ export function pinMetric(metricId) {
AppDispatcher.dispatch({
type: ActionTypes.PIN_METRIC,
metricId,
metricType: AppStore.getAvailableCanvasMetricsTypes()[metricId]
});
updateRoute();
}