|  | 
| 252 | 252 |     }-${sensor.isWeeklySignal ? formatWeek(timeFrame.max_week) : formatDateISO(timeFrame.max)}${suffix}`; | 
| 253 | 253 |   } | 
| 254 | 254 | 
 | 
| 255 |  | -  function injectRanges(spec, timeFrame, annotations) { | 
|  | 255 | +  function injectRanges(spec, timeFrame, annotations, multipleRegions) { | 
| 256 | 256 |     if (annotations.length > 0) { | 
| 257 | 257 |       spec.layer.unshift(genAnnotationLayer(annotations, timeFrame)); | 
| 258 | 258 |     } | 
|  | 
| 264 | 264 |     } | 
| 265 | 265 |     const uncertaintyAnnotation = annotations.find((d) => d.uncertainty); | 
| 266 | 266 |     if (uncertaintyAnnotation) { | 
| 267 |  | -      spec.layer.push(genUncertaintyLayer(uncertaintyAnnotation, { color })); | 
|  | 267 | +      spec.layer.push(genUncertaintyLayer(uncertaintyAnnotation, { color, multipleRegions })); | 
| 268 | 268 |     } | 
| 269 | 269 |     return spec; | 
| 270 | 270 |   } | 
|  | 
| 274 | 274 | 
 | 
| 275 | 275 |   $: raw = singleRaw && sensor.rawValue != null && !($isMobileDevice && showFull); | 
| 276 | 276 |   $: regions = raw ? [region.value] : resolveRegions(region.value, singleRegionOnly, showNeighbors); | 
| 277 |  | -  $: annotations = $annotationManager.getWindowAnnotations(sensor.value, regions, timeFrame.min, timeFrame.max, true); | 
|  | 277 | +  $: annotations = raw | 
|  | 278 | +    ? $annotationManager.getMultiWindowAnnotations( | 
|  | 279 | +        [sensor.value, sensor.rawValue], | 
|  | 280 | +        regions, | 
|  | 281 | +        timeFrame.min, | 
|  | 282 | +        timeFrame.max, | 
|  | 283 | +        true, | 
|  | 284 | +      ) | 
|  | 285 | +    : $annotationManager.getWindowAnnotations(sensor.value, regions, timeFrame.min, timeFrame.max, true); | 
| 278 | 286 |   $: spec = injectRanges( | 
| 279 | 287 |     genSpec(sensor, region, date, timeFrame, { | 
| 280 | 288 |       height, | 
|  | 
| 286 | 294 |       stderr, | 
| 287 | 295 |     }), | 
| 288 | 296 |     timeFrame, | 
| 289 |  | -    annotations, | 
|  | 297 | +    annotations.filter((d) => !d.isAllTime), | 
|  | 298 | +    regions.length > 1, | 
| 290 | 299 |   ); | 
| 291 | 300 |   $: data = raw | 
| 292 | 301 |     ? loadSingleData(sensor, region, timeFrame) | 
|  | 
| 336 | 345 |     <Toggle bind:checked={singleRaw}>Raw Data</Toggle> | 
| 337 | 346 |   {/if} | 
| 338 | 347 |   {#if !($isMobileDevice && raw)} | 
| 339 |  | -    <Toggle bind:checked={showFull}>Show All Dates</Toggle> | 
|  | 348 | +    <Toggle bind:checked={showFull}>All Dates</Toggle> | 
| 340 | 349 |   {/if} | 
| 341 | 350 |   <div class="spacer" /> | 
| 342 | 351 |   <DownloadMenu {fileName} {vegaRef} {data} {sensor} {raw} {stderr} /> | 
|  | 
0 commit comments