Skip to content

Commit

Permalink
#10214: Mobile issue - Overlay of tools and info (#10276) (#10314)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoudadel54 committed May 14, 2024
1 parent 9a97500 commit 0fadc4a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
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

0 comments on commit 0fadc4a

Please sign in to comment.