diff --git a/src/components/App.js b/src/components/App.js index 821cb63f..8e61e71d 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -166,22 +166,20 @@ class Main extends Component { return dispatch(Actions.hideLeftPanelOnMobile()); } }} - // onMarkerClick={ (id) => { - // - // - // dispatch(Actions.setCurrentEntry(id, null)); - // return dispatch(Actions.showLeftPanel()); - // - // }} - onMarkerClick={ (id) => { - - let result= confirm ("Are you sure to go away? All changes will be lost") - if (result) { - dispatch(Actions.setCurrentEntry(id, null)); - return dispatch(Actions.showLeftPanel()); - } + // onMarkerClick={ (id) => { + // dispatch(Actions.setCurrentEntry(id, null)); + // return dispatch(Actions.showLeftPanel()); + // }} + onMarkerClick={ (id) => { + dispatch(Actions.setCurrentEntry(id, null)); + let result= confirm ("Are you sure to go away? All changes will be lost"); + if (result) { + dispatch(Actions.setCurrentEntry(id, null)); + return dispatch(Actions.showLeftPanel()); + } }} + onMoveend={ coordinates => { return dispatch(Actions.onMoveend(coordinates, map.center)); }} onZoomend={ coordinates => { return dispatch(Actions.onZoomend(coordinates, map.zoom)); }} onLocate={ () => { return dispatch(Actions.showOwnPosition()); }} diff --git a/src/components/Map.jsx b/src/components/Map.jsx index 5e2905d8..78a9020a 100644 --- a/src/components/Map.jsx +++ b/src/components/Map.jsx @@ -132,7 +132,7 @@ class KVMMap extends Component { if (highlight.indexOf(e.id) == 0 || highlight.length == 0) opacity = 1; if (marker) opacity = 0.3; - + const fillColor = e.id === highlight[0] ? STYLE.orange : this.getCategoryColorById(e.categories[0]); markers.push( { @@ -144,7 +144,7 @@ class KVMMap extends Component { radius={9} color={'#fff'} weight={0.7} - fillColor={this.getCategoryColorById(e.categories[0])} + fillColor={fillColor} fillOpacity={opacity} > diff --git a/src/components/styling/Stylesheets.js b/src/components/styling/Stylesheets.js index 189e94dd..60dd1dc1 100644 --- a/src/components/styling/Stylesheets.js +++ b/src/components/styling/Stylesheets.js @@ -7,3 +7,4 @@ import "purecss/build/grids-responsive.css" import "purecss/build/menus.css" import "purecss/build/forms.css" import "purecss/build/buttons.css" +import "./setPinActive.css" diff --git a/src/components/styling/Variables.js b/src/components/styling/Variables.js index 9779cb64..5aa77888 100644 --- a/src/components/styling/Variables.js +++ b/src/components/styling/Variables.js @@ -2,6 +2,7 @@ const grayBlue = "rgb(100, 122, 133)"; const blue = "rgb(0, 153, 173)"; const green = "rgb(151, 191, 13 )"; const yellow = "rgb(255, 221, 0 )"; +const orange = "rgb(252, 192, 30)"; const pink = "rgb(229, 98, 146)"; const berry = "rgb(170, 56, 108)"; const coal = "rgb(26, 26, 26)"; @@ -30,7 +31,9 @@ module.exports = { grayBlue, blue, green, + gray, yellow, + orange, pink, berry, coal, diff --git a/src/components/styling/setPinActive.css b/src/components/styling/setPinActive.css new file mode 100644 index 00000000..1541c42a --- /dev/null +++ b/src/components/styling/setPinActive.css @@ -0,0 +1,5 @@ +.leaflet-interactive:focus { + filter: hue-rotate(333deg); + fill: #fcc01e; + color: black; +}