Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

#1909 make sure that the toggle for showing dates is properly hooked up to a fn to change state for showDates

Jason Kent46258aa762de
diff --git a/web/js/components/animation-widget/gif-panel.js b/web/js/components/animation-widget/gif-panel.js
index 2a000e7ab..e36bea380 100644
--- a/web/js/components/animation-widget/gif-panel.js
+++ b/web/js/components/animation-widget/gif-panel.js
@@ -42,7 +42,7 @@ export default class GifPanel extends React.Component {
startDate,
endDate,
onCheck,
- checked,
+ showDates,
numberOfFrames
} = this.props;
const { resolution } = this.state;
@@ -87,7 +87,7 @@ export default class GifPanel extends React.Component {
id="wv-checkbox-gif"
classNames="wv-checkbox-gif"
title="Check box to remove dates from Animating GIF"
- checked={checked}
+ checked={showDates}
onCheck={onCheck}
label="Include Date Stamps"
/>
diff --git a/web/js/containers/gif.js b/web/js/containers/gif.js
index 71ad132f8..282157687 100644
--- a/web/js/containers/gif.js
+++ b/web/js/containers/gif.js
@@ -122,6 +122,7 @@ class GIF extends Component {
startDate={startDate}
endDate={endDate}
onClick={this.createGIF.bind(this)}
+ onCheck={this.toggleShowDates.bind(this)}
numberOfFrames={numberOfFrames}
/>
@@ -144,6 +145,10 @@ class GIF extends Component {
</Modal>
);
}
+ toggleShowDates() {
+ const { showDates } = this.state;
+ this.setState({ showDates: !showDates });
+ }
createGIF(width, height) {
const { getImageArray } = this.props;
const { boundaries } = this.state;