Interactive interface for browsing global, full-resolution satellite imagery
make modal component larger #2306
Benjamin King76599d545823
diff --git a/web/js/components/layer/settings/classification-toggle.js b/web/js/components/layer/settings/classification-toggle.jsindex 545e92ebb..947528730 100644--- a/web/js/components/layer/settings/classification-toggle.js+++ b/web/js/components/layer/settings/classification-toggle.js@@ -13,12 +13,12 @@ class ClassificationToggle extends React.Component {}render() {- const { legend, toggle, palette } = this.props;+ const { legend, toggle, palette, height } = this.props;const tooltips = legend.tooltips;return (<div className="layer-classification-toggle settings-component">- <h2 className="wv-header">Category Enable/Disable</h2>- <Scrollbar style={{ maxHeight: '200px' }}>+ <h2 className="wv-header">Disable/Enable/</h2>+ <Scrollbar style={{ maxHeight: height + 'px' }}>{legend.colors.map((color, index) => {const id = legend.id + index;const tooltip = tooltips[index];diff --git a/web/js/components/layer/settings/settings.js b/web/js/components/layer/settings/settings.jsindex 9df15a290..096b61fac 100644--- a/web/js/components/layer/settings/settings.js+++ b/web/js/components/layer/settings/settings.js@@ -67,7 +67,8 @@ class LayerSettings extends React.Component {groupName,setThresholdRange,layer,- toggleClassification+ toggleClassification,+ screenHeight} = this.props;const { activeIndex } = this.state;const navElements = [];@@ -121,7 +122,7 @@ class LayerSettings extends React.Component {) : null}{(legend.type === 'classification' && legend.colors.length > 1) ? (- <ClassificationToggle palette={palette} toggle={(classIndex) => toggleClassification(layer.id, classIndex, i, groupName)} legend={legend} />+ <ClassificationToggle height={Math.ceil(screenHeight / 2)} palette={palette} toggle={(classIndex) => toggleClassification(layer.id, classIndex, i, groupName)} legend={legend} />) : null}<Palette@@ -170,7 +171,8 @@ class LayerSettings extends React.Component {paletteOrder,groupName,layer,- toggleClassification+ toggleClassification,+ screenHeight} = this.props;const paletteLegends = getPaletteLegends(layer.id);if (!paletteLegends) return '';@@ -183,7 +185,7 @@ class LayerSettings extends React.Component {if (len > 1) {return this.renderMultiColormapCustoms(paletteLegends);} else if (legend.type === 'classification' && legend.colors.length > 1) {- return (<ClassificationToggle palette={palette} toggle={(classIndex) => toggleClassification(layer.id, classIndex, 0, groupName)} legend={legend} />);+ return (<ClassificationToggle height={Math.ceil(screenHeight / 2)} palette={palette} toggle={(classIndex) => toggleClassification(layer.id, classIndex, 0, groupName)} legend={legend} />);}return (<React.Fragment>@@ -285,13 +287,14 @@ class LayerSettings extends React.Component {}function mapStateToProps(state, ownProps) {- const { config, palettes, compare } = state;+ const { config, palettes, compare, browser } = state;const { custom } = palettes;const groupName = compare.activeString;return {paletteOrder: config.paletteOrder,groupName,+ screenHeight: browser.screenHeight,customPalettesIsActive: !!config.features.customPalettes,palettedAllowed: isPaletteAllowed(ownProps.layer.id, config),palettesTranslate,@@ -379,6 +382,7 @@ LayerSettings.propTypes = {palettedAllowed: PropTypes.bool,paletteOrder: PropTypes.array,palettesTranslate: PropTypes.func,+ screenHeight: PropTypes.number,setCustomPalette: PropTypes.func,setFilterRange: PropTypes.func,setOpacity: PropTypes.func,diff --git a/web/js/components/sidebar/paletteLegend.js b/web/js/components/sidebar/paletteLegend.jsindex 64d426f01..66ac69314 100644--- a/web/js/components/sidebar/paletteLegend.js+++ b/web/js/components/sidebar/paletteLegend.js@@ -258,8 +258,8 @@ class PaletteLegend extends React.Component {{isMoreThanOneColorBar ? (<div className="wv-palettes-title">{legend.title}</div>) : (- ''- )}+ ''+ )}<div className="colorbar-case"><canvasclassName="wv-palettes-colorbar"