Skip to content

Commit

Permalink
Improved thumbnail customization of Background Selector (#1870)
Browse files Browse the repository at this point in the history
  • Loading branch information
allyoucanmap authored and offtherailz committed May 23, 2017
1 parent 8956ff3 commit 52e9f87
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions web/client/plugins/BackgroundSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const drawerEnabledControlSelector = (state) => (state.controls && state.control
const HYBRID = require('./background/assets/img/HYBRID.jpg');
const ROADMAP = require('./background/assets/img/ROADMAP.jpg');
const TERRAIN = require('./background/assets/img/TERRAIN.jpg');
const SATELLITE = require('./background/assets/img/SATELLITE.jpg');
const Aerial = require('./background/assets/img/Aerial.jpg');
const mapnik = require('./background/assets/img/mapnik.jpg');
const mapquestOsm = require('./background/assets/img/mapquest-osm.jpg');
Expand All @@ -33,7 +34,8 @@ const thumbs = {
google: {
HYBRID,
ROADMAP,
TERRAIN
TERRAIN,
SATELLITE
},
bing: {
Aerial,
Expand Down Expand Up @@ -64,8 +66,7 @@ const backgroundSelector = createSelector([mapSelector, layersSelector, backgrou
tempLayer: controls.tempLayer || {},
currentLayer: controls.currentLayer || {},
start: controls.start || 0,
enabled: controls.enabled && !drawer,
thumbs
enabled: controls.enabled && !drawer
}));

/**
Expand Down Expand Up @@ -99,7 +100,16 @@ const BackgroundSelectorPlugin = connect(backgroundSelector, {
onToggle: toggleControl.bind(null, 'backgroundSelector', null),
onLayerChange: setControlProperty.bind(null, 'backgroundSelector'),
onStartChange: setControlProperty.bind(null, 'backgroundSelector', 'start')
})(require('../components/background/BackgroundSelector'));
}, (stateProps, dispatchProps, ownProps) => ({
...stateProps,
...dispatchProps,
...ownProps,
thumbs: {
...thumbs,
...ownProps.thumbs
}
})
)(require('../components/background/BackgroundSelector'));

module.exports = {
BackgroundSelectorPlugin,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 52e9f87

Please sign in to comment.