From 26e67bf6977a42227c151aed17b985063ad5eb6d Mon Sep 17 00:00:00 2001 From: Ilan Gold Date: Thu, 25 Aug 2022 17:22:28 +0200 Subject: [PATCH] (fix): `getTileData` args changed (#632) * (fix): `getTileData` args changed * (lint): remove console.log * (chore): changelog. --- CHANGELOG.md | 5 +++++ .../src/multiscale-image-layer/multiscale-image-layer.js | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b289df51..097dff6b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,20 @@ ### Added ### Changed + - Upgrade deck.gl to 8.8 +- Use correct deck.gl 8.8 `getTileData` args. - Replace `postversion` script with `version` script for CI release. - Remove `package-lock.json` from root (since we use pnpm) ## 0.13.1 ### Added + - Added support for loading multiple single channel TIFFs. ### Changed + - Update doc strings for `loadMultiTiff` - Update release notes in `README.md` @@ -23,6 +27,7 @@ ### Added ### Changed + - Migrate to pnpm monorepo - Fix all image URLs in README - Only run CHANGELOG action on pull_requests diff --git a/packages/layers/src/multiscale-image-layer/multiscale-image-layer.js b/packages/layers/src/multiscale-image-layer/multiscale-image-layer.js index cdb0fe124..271b7d153 100644 --- a/packages/layers/src/multiscale-image-layer/multiscale-image-layer.js +++ b/packages/layers/src/multiscale-image-layer/multiscale-image-layer.js @@ -66,12 +66,11 @@ const MultiscaleImageLayer = class extends CompositeLayer { } = this.props; // Get properties from highest resolution const { tileSize, dtype } = loader[0]; - // This is basically to invert: // https://github.com/visgl/deck.gl/pull/4616/files#diff-4d6a2e500c0e79e12e562c4f1217dc80R128 // The z level can be wrong for showing the correct scales because of the calculation deck.gl does // so we need to invert it for fetching tiles and minZoom/maxZoom. - const getTileData = async ({ x, y, z, signal }) => { + const getTileData = async ({ index: { x, y, z }, signal }) => { // Early return if no selections if (!selections || selections.length === 0) { return null;