Doc
This commit is contained in:
1 parent
42e2d7c2c7
commit
460bfbf6e5
1 file changed
+7
-3
@@ -1,11 +1,11 @@
|
|||||||
import react, { useEffect, useRef } from 'react';
|
import react, { useEffect, useRef } from 'react';
|
||||||
|
|
||||||
export interface TileProperties {
|
export interface TileProperties {
|
||||||
// The image's source URL
|
/** The image's source URL */
|
||||||
href: string;
|
href: string;
|
||||||
// Its size
|
/** Its size */
|
||||||
size: number;
|
size: number;
|
||||||
// A delay to add (for test/debug purposes)
|
/** A delay to add (for test/debug purposes) */
|
||||||
delay?: number;
|
delay?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13,6 +13,10 @@ export interface TileProperties {
|
|||||||
*
|
*
|
||||||
* @param props
|
* @param props
|
||||||
* @returns A tile
|
* @returns A tile
|
||||||
|
*
|
||||||
|
* Tile components are containers for images.
|
||||||
|
* They return an empty <g/> element immediately so that the rendering can proceed
|
||||||
|
* and append a, <image/> element whenever the image is loaded.
|
||||||
*/
|
*/
|
||||||
export const Tile: react.FC<TileProperties> = (props: TileProperties) => {
|
export const Tile: react.FC<TileProperties> = (props: TileProperties) => {
|
||||||
const g = useRef<SVGGElement>(null);
|
const g = useRef<SVGGElement>(null);
|
||||||
|
|||||||
Reference in new issue
Block a user