This commit is contained in:
Eric van der Vlist 2022-10-14 21:17:13 +02:00
parent 2122d2e79b
commit 39aa3eb49d
3 changed files with 8 additions and 14 deletions

View File

@ -1,10 +1,5 @@
import { IonContent, ReactComponentOrElement } from '@ionic/react'; import { IonContent } from '@ionic/react';
import react, { import react, { useEffect, useState } from 'react';
ReactComponentElement,
useEffect,
useRef,
useState,
} from 'react';
import './Map.css'; import './Map.css';
import MouseHandler from './MouseHandler'; import MouseHandler from './MouseHandler';
@ -94,7 +89,6 @@ const Map: react.FC<MapProperties> = (props: MapProperties) => {
/> />
); );
} else { } else {
// tileRow.push(<g key={key} />);
tileRow.push(tiledLayer[row][col]); tileRow.push(tiledLayer[row][col]);
} }
} }
@ -102,7 +96,7 @@ const Map: react.FC<MapProperties> = (props: MapProperties) => {
} }
setTiledLayer(newTiledLayer); setTiledLayer(newTiledLayer);
}, [shift, zoom, nbTiles]); }, [shift, zoom, nbTiles, props.height, props.width]);
// console.log(`tiledLayer: ${JSON.stringify(tiledLayer)}`); // console.log(`tiledLayer: ${JSON.stringify(tiledLayer)}`);

View File

@ -1,4 +1,4 @@
import react, { Fragment, ReactElement, ReactSVGElement } from 'react'; import react, { ReactElement } from 'react';
interface SlippyBoardProperties { interface SlippyBoardProperties {
boardSize: number; boardSize: number;

View File

@ -1,4 +1,4 @@
import react, { useEffect, useMemo, useRef, useState } from 'react'; import react, { useEffect, useRef } from 'react';
interface TileProperties { interface TileProperties {
href?: string; href?: string;
@ -45,7 +45,7 @@ const Tile: react.FC<TileProperties> = (props: TileProperties) => {
}; };
loadImage(); loadImage();
} }
}, [props.href]); }, [props.href, props.delay]);
// const children = useMemo( // const children = useMemo(
// () => ( // () => (