Skip to content
Draft
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
2 changes: 1 addition & 1 deletion web/client/plugins/MousePosition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default {
MousePositionPlugin: Object.assign(MousePositionPlugin, {
MapFooter: {
name: 'mousePosition',
position: 2,
position: 3,
target: 'right-footer',
priority: 1
}
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/ScaleBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default {
}, {
MapFooter: {
name: 'scale',
position: 1,
position: 2,
target: 'right-footer',
priority: 1
}
Expand Down
15 changes: 12 additions & 3 deletions web/client/plugins/WidgetsTray.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import WidgetsTray from './widgets/WidgetsTray';
import autoDisableWidgets from './widgets/autoDisableWidgets';
import epics from '../epics/widgetsTray';
import { createPlugin } from '../utils/PluginsUtils';

/**
* Plugin that allow to collapse widgets. Shows a small tray where to see the collapsed plugins list.
Expand All @@ -18,7 +19,15 @@ import epics from '../epics/widgetsTray';
* @prop {boolean|string|array} [toolsOptions.seeHidden] hides the widgets under particular conditions. **Must** be the same of rule of the Widget plugin. @see plugins.Widgets.
* @class
*/
export default {
WidgetsTrayPlugin: autoDisableWidgets(WidgetsTray),
export default createPlugin("WidgetsTrayPlugin", {
component: autoDisableWidgets(WidgetsTray),
containers: {
MapFooter: {
name: 'widgetsTray',
position: 1,
target: 'right-footer',
priority: 1
}
},
epics
};
});
14 changes: 8 additions & 6 deletions web/client/plugins/widgets/WidgetsTray.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,16 @@ class WidgetsTray extends React.Component {
render() {
return this.props.enabled
? (<div className="widgets-tray"
style={{
marginBottom: this.props.isMobileAgent && !this.props.is3DMap ? 60 : 2,
style={this.props.isMobileAgent ? {
marginBottom: !this.props.is3DMap ? 60 : 2,
marginRight: (this.props.layout?.right ?? 0) + 65,
bottom: 0,
right: 0,
position: "absolute"
}}>
position: "absolute",
zIndex: 1000
} : {}}>
<BorderLayout
style={{ width: 'auto' }}
columns={[
...( !this.props.isSingleWidgetLayout
? [<CollapseTrayButton key="collapse-tray" toolsOptions={this.props.toolsOptions} expanded={this.props.expanded} onClick={() => this.props.setExpanded(!this.props.expanded)} />]
Expand Down Expand Up @@ -137,9 +139,9 @@ export default compose(
hasCollapsedWidgets: widgets.filter(({ collapsed } = {}) => collapsed).length > 0,
hasTrayWidgets: widgets.length > 0
})),
withProps(({ isMobileAgent, width, singleWidgetLayoutBreakpoint = 1024 }) => {
withProps(({ isMobileAgent }) => {
return {
isSingleWidgetLayout: isMobileAgent || width <= singleWidgetLayoutBreakpoint
isSingleWidgetLayout: isMobileAgent
};
}),
// flag of plugin presence
Expand Down
6 changes: 4 additions & 2 deletions web/client/themes/default/less/widget.less
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,7 @@
}

.widgets-tray {
.shadow-soft;
padding: 4px;
z-index: 1000;
.widgets-bar {
> span {
button.btn {
Expand All @@ -493,6 +491,10 @@
border-right: 1px solid @ms-main-border-color;
}
}
.ms2-border-layout-body,
.ms2-border-layout-content {
flex: none !important;
}
}

.mapstore-chart-advance-options {
Expand Down