Skip to content

Commit bffbed7

Browse files
committed
Datetime selection #2
1 parent 4bac693 commit bffbed7

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ function App() {
162162
<RangeSlider
163163
minMax={[zarrReader.scale.min, zarrReader.scale.max]}
164164
label="Scale"
165-
// @ts-expect-error: already fixed in the feature branch
166165
onValueChange={setMinMax}
167166
/>
168167

src/zarr/index.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,14 @@ export default class ZarrReader {
114114
}: TileIndex & { timestamp: number }): Promise<
115115
TypedArray<NumberDataType> | undefined
116116
> {
117-
const arr = await zarr.open.v3(
118-
this.root.resolve(`${this._t}/${this._varName}`),
119-
{
120-
kind: "array",
121-
}
122-
);
117+
const arr = await zarr.open.v3(this.root.resolve(`${z}/${this._varName}`), {
118+
kind: "array",
119+
});
123120

124121
if (arr.is("number")) {
125122
const { data } = await arr.getChunk([timestamp, y, x]);
126123
// @TODO : remove once the data has actual timestamps
127-
if (timestamp == 2) {
124+
if (timestamp == 1) {
128125
return new Float32Array(this.tileSize * this.tileSize);
129126
}
130127

0 commit comments

Comments
 (0)