diff --git a/web/client/components/background/BackgroundSelector.jsx b/web/client/components/background/BackgroundSelector.jsx index 5e0e35e9f1..65dc36a091 100644 --- a/web/client/components/background/BackgroundSelector.jsx +++ b/web/client/components/background/BackgroundSelector.jsx @@ -58,12 +58,6 @@ const BackgroundSelector = React.createClass({ this.props.onLayerChange('tempLayer', {}); this.props.onStartChange(0); }, - componentWillUpdate(nextProps) { - if (this.props.size.width !== nextProps.size.width - || this.props.size.height !== nextProps.size.height) { - this.props.onStartChange(0); - } - }, getThumb(layer) { return this.props.thumbs[layer.source] && this.props.thumbs[layer.source][layer.name] || layer.thumbURL || this.props.thumbs.unknown; }, diff --git a/web/client/components/background/PreviewList.jsx b/web/client/components/background/PreviewList.jsx index ba83444510..1a15c99dae 100644 --- a/web/client/components/background/PreviewList.jsx +++ b/web/client/components/background/PreviewList.jsx @@ -36,12 +36,12 @@ const PreviewList = React.createClass({ }, render() { let iconButtons = [].concat(this.props.icons); - iconButtons = iconButtons.slice(this.props.start, this.props.start + this.props.length); + iconButtons = this.props.pagination ? iconButtons.slice(this.props.start, this.props.start + this.props.length) : iconButtons; if (this.props.pagination) { if (this.props.start !== 0) { iconButtons.unshift( { this.props.onStartChange(this.props.start - 1); }} />); } - if (this.props.start + this.props.length !== this.props.icons.length) { + if (this.props.start + this.props.length < this.props.icons.length) { iconButtons.push( { this.props.onStartChange(this.props.start + 1); } } />); } } diff --git a/web/client/components/background/__tests__/BackgroundSelector-test.jsx b/web/client/components/background/__tests__/BackgroundSelector-test.jsx index fd4ad6b79c..8ef0ac0e97 100644 --- a/web/client/components/background/__tests__/BackgroundSelector-test.jsx +++ b/web/client/components/background/__tests__/BackgroundSelector-test.jsx @@ -69,11 +69,6 @@ describe("test the BackgroundSelector", () => { const node = ReactDOM.findDOMNode(backgroundSelector); expect(node).toExist(); - backgroundSelector.componentWillUpdate({size: {width: 1000, height: 400}, drawerEnabled: false}); - backgroundSelector.componentWillUpdate({size: {width: 900, height: 500}, drawerEnabled: false}); - backgroundSelector.componentWillUpdate({size: {width: 1000, height: 500}, drawerEnabled: true}); - backgroundSelector.componentWillUpdate({size: {width: 1000, height: 500}, drawerEnabled: false}); - const icons = backgroundSelector.getIcons(5, 5, 5, false); expect(icons.length).toBeGreaterThan(0); diff --git a/web/client/components/mapcontrols/search/searchbar.css b/web/client/components/mapcontrols/search/searchbar.css index 1cb9b7c488..de578a03bf 100644 --- a/web/client/components/mapcontrols/search/searchbar.css +++ b/web/client/components/mapcontrols/search/searchbar.css @@ -1,5 +1,5 @@ .MapSearchBar { - left: 45px; + left: 65px; position: absolute; right: 55px; top: 10px; diff --git a/web/client/components/print/Font.jsx b/web/client/components/print/Font.jsx index c3ea0435f1..944c75c84f 100644 --- a/web/client/components/print/Font.jsx +++ b/web/client/components/print/Font.jsx @@ -38,8 +38,8 @@ const Font = React.createClass({ onChangeFamily(family) { this.props.onChangeFamily(family); }, - onChangeSize(size) { - this.props.onChangeSize(size); + onChangeSize(e) { + this.props.onChangeSize(parseFloat(e.target.value)); }, render() { return ( diff --git a/web/client/epics/wfsquery.js b/web/client/epics/wfsquery.js index 5719600db1..546ce78844 100644 --- a/web/client/epics/wfsquery.js +++ b/web/client/epics/wfsquery.js @@ -238,12 +238,12 @@ const viewportSelectedEpic = (action$, store) => action$.ofType(SELECT_VIEWPORT_SPATIAL_METHOD, CHANGE_MAP_VIEW) .switchMap((action) => { // calculate new geometry from map properties only for viewport - const map = action.type === CHANGE_MAP_VIEW ? action : store.getState().map.present; + const map = action.type === CHANGE_MAP_VIEW ? action : store.getState().map.present || store.getState().map; if (action.type === SELECT_VIEWPORT_SPATIAL_METHOD || action.type === CHANGE_MAP_VIEW && store.getState().queryform && store.getState().queryform.spatialField && - store.getState().queryform.spatialField.method === "viewport") { + store.getState().queryform.spatialField.method === "Viewport") { const bounds = Object.keys(map.bbox.bounds).reduce((p, c) => { return assign({}, p, {[c]: parseFloat(map.bbox.bounds[c])}); }, {}); diff --git a/web/client/examples/plugins/assets/css/plugins.css b/web/client/examples/plugins/assets/css/plugins.css index 62d597d99d..0d75f7af37 100644 --- a/web/client/examples/plugins/assets/css/plugins.css +++ b/web/client/examples/plugins/assets/css/plugins.css @@ -92,3 +92,9 @@ html, body, #container, #map { #plugins-list { overflow-x: hidden; } + +#plugins-container { + position: absolute; + width: 100%; + height: 100%; +} diff --git a/web/client/examples/plugins/plugins.js b/web/client/examples/plugins/plugins.js index 6bc8c20d50..69a6143173 100644 --- a/web/client/examples/plugins/plugins.js +++ b/web/client/examples/plugins/plugins.js @@ -25,17 +25,17 @@ 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') diff --git a/web/client/examples/print/index.html b/web/client/examples/print/index.html index faead1dc7b..c200cd6d13 100644 --- a/web/client/examples/print/index.html +++ b/web/client/examples/print/index.html @@ -9,7 +9,6 @@ -