diff --git a/imports/ui/components/SelectionMap/SelectionMap.js b/imports/ui/components/SelectionMap/SelectionMap.js index 2bda7fb..d96ca96 100644 --- a/imports/ui/components/SelectionMap/SelectionMap.js +++ b/imports/ui/components/SelectionMap/SelectionMap.js @@ -19,7 +19,7 @@ import 'leaflet-graphicscale/dist/Leaflet.GraphicScale.min.css'; import 'leaflet-graphicscale/dist/Leaflet.GraphicScale.min.js'; import 'leaflet-sleep/Leaflet.Sleep.js'; import Control from 'react-leaflet-control'; -import { Button, ButtonGroup } from 'react-bootstrap'; +import { Row, Col, Button, ButtonGroup } from 'react-bootstrap'; import subsUnion from '/imports/ui/components/Maps/SubsUnion/SubsUnion'; import UserSubsToFiresCollection from '/imports/api/Subscriptions/Subscriptions'; import './SelectionMap.scss'; @@ -161,97 +161,100 @@ class SelectionMap extends Component { const { t, onRemove } = this.props; return ( this.isValidState() ? -
- { - this.selectionMap = map; - this.handleLeafletLoad(map); - }} - sleep={window.location.pathname === '/'} - sleepTime={10750} - wakeTime={750} - onViewportChanged={this.onViewportChanged} - sleepNote - hoverToWake={false} - wakeMessage={t('Pulsa para activar')} - wakeMessageTouch={t('Pulsa para activar')} - sleepOpacity={0.6} - > - - {this.props.action === action.edit && - this.props.currentSubs.map((subs, index) => ( - { onRemove(subs._id); }} - > - {index === 0 && - + + { + this.selectionMap = map; + this.handleLeafletLoad(map); + }} + sleep={window.location.pathname === '/'} + sleepTime={10750} + wakeTime={750} + onViewportChanged={this.onViewportChanged} + sleepNote + hoverToWake={false} + wakeMessage={t('Pulsa para activar')} + wakeMessageTouch={t('Pulsa para activar')} + sleepOpacity={0.6} + > + + {this.props.action === action.edit && + this.props.currentSubs.map((subs, index) => ( + { onRemove(subs._id); }} + > + {index === 0 && + + {t('Pulsa aquí para borrar la zona')} + + } + + )) + } + {this.props.action === action.add && + + { this.marker = ref; }} + /> + + { this.distanceCircle = ref; }} + color="#145A32" + fillColor="green" + fillOpacity={0.1} + radius={this.state.distance * 1000} + /> + + } + + + { this.props.sndBtn && this.props.onSndBtn && + - } - - - - -
: + {this.props.sndBtn} + + } + + + + + + + :
); } }