Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1869 Improve thumbnail customization of Background Selector #1870

Merged
merged 1 commit into from
May 23, 2017
Merged
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
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.