Interactive interface for browsing global, full-resolution satellite imagery
Fixed issue with ZOT not performing a refresh on the legend palette.
Stephan Wlodarczyk033897b12347
diff --git a/web/js/components/sidebar/paletteLegend.js b/web/js/components/sidebar/paletteLegend.jsindex 704760ca9..31a0d3826 100644--- a/web/js/components/sidebar/paletteLegend.js+++ b/web/js/components/sidebar/paletteLegend.js@@ -16,6 +16,7 @@ class PaletteLegend extends React.Component {colorHex: props.colorHex,isHoveringCanvas: props.isHoveringCanvas,width: this.props.width,+scrollContainerEl: null};}@@ -41,9 +42,9 @@ class PaletteLegend extends React.Component {});}- componentDidUpdate(prevProps) {- // Only updates when layer options/settings have changed- if (!lodashIsEqual(this.props.layer, prevProps.layer)) {+ componentDidUpdate(prevProps, prevState) {+ // Only updates when layer options/settings have changed or if ZOT changes the width of the palette+ if (!lodashIsEqual(this.props.layer, prevProps.layer) || (prevProps.width !== this.props.width)) {this.updateCanvas();}}