This commit is contained in:
Eric van der Vlist 2022-11-01 11:50:59 +01:00
parent 04d2aa1ac1
commit 352cb0d870
5 changed files with 8 additions and 17 deletions

View File

@ -1,10 +1,9 @@
import react, { useRef } from 'react'; import react, { useRef } from 'react';
import { useAtom } from 'jotai';
import { Point } from './types'; import { Point } from './types';
import './Handler.css'; import './Handler.css';
import { handlersConfig } from './config'; import { handlersConfig } from './config';
import { relativeCoordinateSystemAtom, Transformation } from './LiveMap'; import { Transformation } from './LiveMap';
/** /**
* *

View File

@ -27,16 +27,16 @@ describe('The LayerStack component', () => {
transform="translate(0, 0) scale(1)" transform="translate(0, 0) scale(1)"
> >
<g <g
transform="scale(64) translate(-194.25, -83.25)" transform="scale(1024) translate(-194.25, -83.25)"
/> />
<g <g
transform="scale(128) translate(-388.5, -166.5)" transform="scale(512) translate(-388.5, -166.5)"
/> />
<g <g
transform="scale(1024) translate(-3108, -1332)" transform="scale(64) translate(-3108, -1332)"
/> />
<g <g
transform="scale(512) translate(-1554, -666)" transform="scale(128) translate(-1554, -666)"
/> />
<g <g
transform="scale(256) translate(-777, -333)" transform="scale(256) translate(-777, -333)"
@ -175,10 +175,10 @@ describe('The LayerStack component', () => {
transform="translate(0, 0) scale(1)" transform="translate(0, 0) scale(1)"
> >
<g <g
transform="scale(128) translate(-388.5, -166.5)" transform="scale(512) translate(-388.5, -166.5)"
/> />
<g <g
transform="scale(512) translate(-1554, -666)" transform="scale(128) translate(-1554, -666)"
/> />
<g <g
transform="scale(256) translate(-777, -333)" transform="scale(256) translate(-777, -333)"

View File

@ -1,5 +1,4 @@
import react from 'react'; import react from 'react';
import { atom } from 'jotai';
import { Point, MapScope } from './types'; import { Point, MapScope } from './types';
import LayerStack from './LayerStack'; import LayerStack from './LayerStack';
@ -17,11 +16,6 @@ export interface MapProperties {
* *
*/ */
export const Map: react.FC<MapProperties> = (props: MapProperties) => { export const Map: react.FC<MapProperties> = (props: MapProperties) => {
const centerPX = {
x: window.innerWidth / 2,
y: window.innerHeight / 2,
};
const tileProvider = tileProviders[props.scope.tileProvider]; const tileProvider = tileProviders[props.scope.tileProvider];
const tilesZoom = Math.min( const tilesZoom = Math.min(

View File

@ -1,4 +1,3 @@
import { useAtom } from 'jotai';
import react from 'react'; import react from 'react';
import TileSet from './TileSet'; import TileSet from './TileSet';
import { Point, TileKeyObject } from './types'; import { Point, TileKeyObject } from './types';

View File

@ -1,5 +1,4 @@
import Tile from './Tile'; import { TileKeyObject } from './types';
import { TileFactory, TileKeyObject } from './types';
export interface TileProvider { export interface TileProvider {
name: string; name: string;