Example #1
0
 toChanged (evt) {
   if (evt.target.selectedIndex !== this.props.lossToSelectIndex) {
     layerActions.updateLossTimeline({
       fromSelectedIndex: this.props.lossFromSelectIndex,
       toSelectedIndex: evt.target.selectedIndex
     });
   }
 }
Example #2
0
 layerUtils.getLayerMetadata(url).then((results) => {
   const min = results.minValues[0];
   const max = results.maxValues[0];
   for ( let i = min; i <= max; i++ ) {
     lossOptions.push({ label: 2000 + i + '', value: i });
   }
   //- Update the defaults to be the last year
   layerActions.updateLossTimeline({
     fromSelectedIndex: 0,
     toSelectedIndex: lossOptions.length - 1
   });
   //- Set the options in the store so others can use it
   layerActions.setLossOptions(lossOptions);
 });