Skip to content

Commit

Permalink
Fixes geosolutions-it#1868: fixed some of the plugins to better work …
Browse files Browse the repository at this point in the history
…in the plugins example
  • Loading branch information
mbarto committed May 23, 2017
1 parent 8956ff3 commit 76fe7a5
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 54 deletions.
2 changes: 1 addition & 1 deletion web/client/components/mapcontrols/search/searchbar.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.MapSearchBar {
left: 45px;
left: 65px;
position: absolute;
right: 55px;
top: 10px;
Expand Down
6 changes: 6 additions & 0 deletions web/client/examples/plugins/assets/css/plugins.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,9 @@ html, body, #container, #map {
#plugins-list {
overflow-x: hidden;
}

#plugins-container {
position: absolute;
width: 100%;
height: 100%;
}
9 changes: 5 additions & 4 deletions web/client/examples/plugins/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,21 @@ module.exports = {
TOCPlugin: require('../../plugins/TOC'),
FeatureGridPlugin: require('../../plugins/FeatureGrid'),
RasterStylerPlugin: require('../../plugins/RasterStyler'),
VectorStylerPlugin: require('../../plugins/VectorStyler'),
BackgroundSwitcherPlugin: require('../../plugins/BackgroundSwitcher'),
BackgroundSelectorPlugin: require('../../plugins/BackgroundSelector'),
MeasurePlugin: require('../../plugins/Measure'),
MeasureResultsPlugin: require('../../plugins/MeasureResults'),
PrintPlugin: require('../../plugins/Print'),
FullScreenPlugin: require('../../plugins/FullScreen'),
SnapshotPlugin: require('../../plugins/Snapshot'),
ShapeFilePlugin: require('../../plugins/ShapeFile'),
MetadataExplorerPlugin: require('../../plugins/MetadataExplorer'),
SettingsPlugin: require('../../plugins/Settings'),
TutorialPlugin: require('../../plugins/Tutorial'),
ExpanderPlugin: require('../../plugins/Expander'),
HelpPlugin: require('../../plugins/Help'),
SharePlugin: require('../../plugins/Share'),
HomePlugin: require('../../plugins/Home'),
LoginPlugin: require('../../plugins/Login')
LoginPlugin: require('../../plugins/Login'),
VectorStylerPlugin: require('../../plugins/VectorStyler')
},
requires: {}
};
4 changes: 2 additions & 2 deletions web/client/plugins/BackgroundSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {changeLayerProperties} = require('../actions/layers');
const {createSelector} = require('reselect');
const {layersSelector} = require('../selectors/layers');

const mapSelector = (state) => (state.map && state.map.present) || {};
const {mapSelector} = require('../selectors/map');
const backgroundControlsSelector = (state) => (state.controls && state.controls.backgroundSelector) || {};
const drawerEnabledControlSelector = (state) => (state.controls && state.controls.drawer && state.controls.drawer.enabled) || false;

Expand Down Expand Up @@ -59,7 +59,7 @@ const thumbs = {

const backgroundSelector = createSelector([mapSelector, layersSelector, backgroundControlsSelector, drawerEnabledControlSelector],
(map, layers, controls, drawer) => ({
size: map.size || {width: 0, height: 0},
size: map && map.size || {width: 0, height: 0},
layers: layers.filter((layer) => layer.group === "background") || [],
tempLayer: controls.tempLayer || {},
currentLayer: controls.currentLayer || {},
Expand Down
4 changes: 2 additions & 2 deletions web/client/plugins/MetadataExplorer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ const MetadataExplorerComponent = React.createClass({
return {
id: "mapstore-metadata-explorer",
active: false,
wrap: false,
modal: true,
wrap: true,
modal: false,
wrapWithPanel: false,
panelStyle: {
zIndex: 100,
Expand Down
4 changes: 2 additions & 2 deletions web/client/plugins/ShapeFile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {

const ShapeFilePlugin = connect((state) => (
{
visible: state.controls && state.controls.shapefile && state.controls.shapefile.enabled,
visible: state.controls && state.controls.shapefile && state.controls.shapefile.enabled || state.controls && state.controls.toolbar && state.controls.toolbar.active === 'shapefile',
layers: state.shapefile && state.shapefile.layers || null,
selected: state.shapefile && state.shapefile.selected || null,
bbox: state.shapefile && state.shapefile.bbox || null,
Expand Down Expand Up @@ -58,7 +58,7 @@ module.exports = {
help: <Message msgId="helptexts.shapefile"/>,
title: "shapefile.title",
tooltip: "shapefile.tooltip",
wrap: true,
wrap: false,
icon: <Glyphicon glyph="open-file"/>,
exclusive: true,
priority: 1
Expand Down
3 changes: 2 additions & 1 deletion web/client/plugins/burgermenu/burgermenu.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#mapstore-burger-menu {
position: absolute;
left: 200px;
right: 0;
top: 0;
}

#mapstore-navbar #mapstore-burger-menu {
Expand Down
9 changes: 1 addition & 8 deletions web/client/plugins/shapefile/ShapeFile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,7 @@ const ShapeFile = React.createClass({
id: "mapstore-shapefile-upload",
wrap: true,
wrapWithPanel: false,
panelStyle: {
minWidth: "360px",
zIndex: 100,
position: "absolute",
overflow: "visible",
top: "100px",
left: "calc(50% - 150px)"
},
panelStyle: {},
panelClassName: "toolbar-panel",
visible: false,
toggleControl: () => {},
Expand Down
34 changes: 0 additions & 34 deletions web/client/product/assets/css/viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,40 +55,6 @@ html, body, #container, .fill {
background-size:contain;
}

.leafletbottom.leafletright, .leaflet-control-minimap{
bottom: 47px !important;
right: 49px !important;
}

.leaflet-control-scale {
position: absolute;
bottom: -1px;
right: 47px;
z-index: 1000;
}
.leaflet-control-attribution {
width: 165px;
position: absolute;
right: 0;
bottom: 0;
}

.leaflet-bottom.leaflet-right {
margin-bottom: 0 !important;
}

.ol-custom-overviewmap, .ol-custom-overviewmap.ol-uncollapsible {
bottom: 55px !important;
left: auto !important;
right: 57px !important;
top: auto !important;
}

.ol-scale-line.ol-unselectable {
right: 58px;
left: auto;
bottom: 3px;
}
.modal-dialog-container {
z-index: 2000!important;
}
50 changes: 50 additions & 0 deletions web/client/themes/default/ms2-theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -1036,3 +1036,53 @@ select.form-control option {
.application-version-label {
font-weight: bold;
}

.leafletbottom.leafletright, .leaflet-control-minimap{
bottom: 47px !important;
right: 49px !important;
}

.leaflet-control-scale {
position: absolute;
bottom: -1px;
right: 47px;
z-index: 1000;
}
.leaflet-control-attribution {
width: 165px;
position: absolute;
right: 0;
bottom: 0;
}

.leaflet-bottom.leaflet-right {
margin-bottom: 0 !important;
}

.ol-custom-overviewmap, .ol-custom-overviewmap.ol-uncollapsible {
bottom: 55px !important;
left: auto !important;
right: 57px !important;
top: auto !important;
}

.ol-scale-line.ol-unselectable {
right: 58px;
left: auto;
bottom: 3px;
}

.toolbar-panel #background-switcher {
max-height: 600px;
overflow: auto;
}

#mapstore-shapefile-upload {
min-width: 360px;
z-index: 100;
position: absolute;
overflow: visible;
top: 100px;
width: 50%;
left: ~"calc(50% - 150px)";
}

0 comments on commit 76fe7a5

Please sign in to comment.