Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chizhovm калі ласка вярніце код, гэты код і стварыце асобную картку, апішыце чаму вырашылі, ягэ прыбраць.

Падказка.
Калі ласка кіруйцеся вынікамі нашай раўмовы. І заўвагай, што гэты код магчыма адказвае за функцыю пацверджання выхаду з рэжыма рэдагавання, але стаіць не у патрэбнм месцы.

Падказка 2.
Выкарыстоўвай асобныя галіны для кожнага ПР. Тадыя код не склейваецца у адну пачку.


onMoveend={ coordinates => { return dispatch(Actions.onMoveend(coordinates, map.center)); }}
onZoomend={ coordinates => { return dispatch(Actions.onZoomend(coordinates, map.zoom)); }}
onLocate={ () => { return dispatch(Actions.showOwnPosition()); }}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<CircleMarker
onClick={() => {
Expand All @@ -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}
>
<SmallTooltip direction='bottom' offset={[0, 10]}>
Expand Down
1 change: 1 addition & 0 deletions src/components/styling/Stylesheets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 3 additions & 0 deletions src/components/styling/Variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)";
Expand Down Expand Up @@ -30,7 +31,9 @@ module.exports = {
grayBlue,
blue,
green,
gray,
yellow,
orange,
pink,
berry,
coal,
Expand Down
5 changes: 5 additions & 0 deletions src/components/styling/setPinActive.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.leaflet-interactive:focus {
filter: hue-rotate(333deg);
fill: #fcc01e;
color: black;
}