From bcdc7c68112abfd498f56f0c87d0210b54d60b99 Mon Sep 17 00:00:00 2001 From: orangemug Date: Sun, 23 Sep 2018 14:39:02 +0100 Subject: [PATCH] Improved color accessibility UI --- src/components/App.jsx | 2 +- src/components/Toolbar.jsx | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/App.jsx b/src/components/App.jsx index 7cce8783..c1da61c4 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -166,7 +166,7 @@ export default class App extends React.Component { selectedLayerIndex: 0, sources: {}, vectorLayers: {}, - mapState: "normal", + mapState: "map", spec: styleSpec.latest, isOpen: { settings: false, diff --git a/src/components/Toolbar.jsx b/src/components/Toolbar.jsx index 0103bf88..c0a21905 100644 --- a/src/components/Toolbar.jsx +++ b/src/components/Toolbar.jsx @@ -131,26 +131,30 @@ export default class Toolbar extends React.Component { }, { id: "filter-deuteranopia", - title: "Filter deuteranopia", + title: "Map (deuteranopia)", icon: , }, { id: "filter-protanopia", - title: "Filter protanopia", + title: "Map (protanopia)", icon: , }, { id: "filter-tritanopia", - title: "Filter tritanopia", + title: "Map (tritanopia)", icon: , }, { id: "filter-achromatopsia", - title: "Filter achromatopsia", + title: "Map (achromatopsia)", icon: , }, ]; + const currentView = views.find((view) => { + return view.id === this.props.mapState; + }); + return