summaryrefslogtreecommitdiff
path: root/src/components/map/elements/HoverTile.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-10 21:47:58 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:06:00 +0200
commit8bd2bc91cc7e97f233031a42ccfda92af5e8bb96 (patch)
treeb2e4b127580140f3cb025af4d4490e8434ad63a7 /src/components/map/elements/HoverTile.js
parent540bb00a64e4704a0c08459af2b158bdafd59a60 (diff)
Implement map zooming
Diffstat (limited to 'src/components/map/elements/HoverTile.js')
-rw-r--r--src/components/map/elements/HoverTile.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/map/elements/HoverTile.js b/src/components/map/elements/HoverTile.js
index a8bb2085..02d31714 100644
--- a/src/components/map/elements/HoverTile.js
+++ b/src/components/map/elements/HoverTile.js
@@ -4,10 +4,12 @@ import {Rect} from "react-konva";
import {ROOM_HOVER_INVALID_COLOR, ROOM_HOVER_VALID_COLOR} from "../../../colors/index";
import {TILE_SIZE_IN_PIXELS} from "../MapConstants";
-const HoverTile = ({pixelX, pixelY, isValid, onClick}) => (
+const HoverTile = ({pixelX, pixelY, isValid, scale, onClick}) => (
<Rect
x={pixelX}
y={pixelY}
+ scaleX={scale}
+ scaleY={scale}
width={TILE_SIZE_IN_PIXELS}
height={TILE_SIZE_IN_PIXELS}
fill={isValid ? ROOM_HOVER_VALID_COLOR : ROOM_HOVER_INVALID_COLOR}