Skip to content
Merged
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
10 changes: 7 additions & 3 deletions web/client/plugins/widgets/WidgetsTray.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import WidgetsBar from './WidgetsBar';
import BButton from '../../components/misc/Button';
import {mapLayoutValuesSelector} from "../../selectors/maplayout";
import {withContainerDimensions} from "./withContainerDimensions";
import { is3DMode } from '../../selectors/maptype';

const Button = tooltip(BButton);

Expand Down Expand Up @@ -81,7 +82,9 @@ class WidgetsTray extends React.Component {
expanded: PropTypes.bool,
setExpanded: PropTypes.func,
layout: PropTypes.object,
isSingleWidgetLayout: PropTypes.bool
isSingleWidgetLayout: PropTypes.bool,
isMobileAgent: PropTypes.bool,
is3DMap: PropTypes.bool
};
static defaultProps = {
enabled: true,
Expand All @@ -94,7 +97,7 @@ class WidgetsTray extends React.Component {
return this.props.enabled
? (<div className="widgets-tray"
style={{
marginBottom: 32,
marginBottom: this.props.isMobileAgent && !this.props.is3DMap ? 60 : 32,
marginRight: (this.props.layout?.right ?? 0) + 65,
bottom: 0,
right: 0,
Expand Down Expand Up @@ -124,7 +127,8 @@ export default compose(
trayWidgets,
state => state.browser && state.browser.mobile,
(state) => mapLayoutValuesSelector(state, { right: true }),
(widgets, isMobileAgent, layout = []) => ({ widgets, layout, isMobileAgent })
is3DMode,
(widgets, isMobileAgent, layout = [], is3DMap) => ({ widgets, layout, isMobileAgent, is3DMap })
), {
toggleTray
}),
Expand Down
4 changes: 2 additions & 2 deletions web/client/themes/default/less/leaflet.less
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
}

.leaflet-control-scale {
top: 10px;
right: 10px;
bottom: 5px;
right: 55px ;
clear: none;
z-index: 1000;
}
Expand Down