Closed keller-mark closed 11 months ago
The slice
helpers are just simple objects in both Zarrita and ZarrJS (or at least now they are: https://github.com/manzt/zarrita.js/pull/121). We can just create these ourselves, rather than using those utilities.
For the bounds check error, we can just create that ourselves as well (just make sure the slices are within the bounds) and then throw our own errors that we catch in the onTileError
. See #700
Do you mind if I close in favor of #700 ?
No, go ahead!
Background
ZarrJS cannot currently be tree-shaken-out of the
ZarrPixelSource
class because it importsslice
andBoundsCheckError
.Change List
slice
function and error type as constructor parameters. Usesuper()
in the subclasses to enablesuper(zarr.slice, zarr.BoundsCheckError)
andsuper(zarrita.slice, zarrita.BoundsCheckError)
Checklist