mirror of
https://github.com/ccmdi/obsidian-map-plus.git
synced 2026-07-22 06:43:14 +00:00
refactor: use boundingBox
This commit is contained in:
parent
d183ecab65
commit
e5e1c3263b
1 changed files with 3 additions and 5 deletions
|
|
@ -449,11 +449,9 @@ export function createMapRenderer(config: MapRendererOptions): Deck<MapViewType[
|
|||
_offset: number;
|
||||
tile: Tile2DHeader<HTMLImageElement>;
|
||||
}) => {
|
||||
//TODO: replace with boundingBox
|
||||
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
||||
const bbox = props.tile.bbox;
|
||||
if (!('west' in bbox)) return null;
|
||||
const { west, south, east, north } = bbox;
|
||||
const boundingBox = props.tile.boundingBox;
|
||||
if (!boundingBox || boundingBox.length !== 2) return null;
|
||||
const [[west, south], [east, north]] = boundingBox;
|
||||
return new BitmapLayer({
|
||||
...props,
|
||||
data: undefined,
|
||||
|
|
|
|||
Loading…
Reference in a new issue