Full screen on maps

This commit is contained in:
vjrj 2018-02-27 11:37:54 +01:00
parent b5620cea46
commit dc92574bc3
9 changed files with 61 additions and 2 deletions

View file

@ -0,0 +1,28 @@
/* eslint-disable react/jsx-indent-props */
/* eslint-disable import/no-absolute-path */
/* eslint-disable import/no-absolute-path */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import FullscreenControl from 'react-leaflet-fullscreen';
import 'react-leaflet-fullscreen/dist/styles.css';
class FullScreenMap extends Component {
render() {
const { t } = this.props;
return (
<FullscreenControl
position="topleft"
title={t('Pantalla completa')}
titleCancel={t('Salir de pantalla completa')}
/>
);
}
}
FullScreenMap.propTypes = {
t: PropTypes.func.isRequired
};
export default translate([], { wait: true })(FullScreenMap);

View file

@ -23,6 +23,8 @@ 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 { isChrome } from '/imports/ui/components/Utils/isMobile';
import FullScreenMap from '/imports/ui/components/Maps/FullScreenMap';
import './SelectionMap.scss';
export const action = {
@ -253,6 +255,7 @@ class SelectionMap extends Component {
</Button>
</ButtonGroup>
</Control>
<FullScreenMap />
</Map>
</Col>
</Row>