summaryrefslogtreecommitdiff
path: root/src/containers/map/layers
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-08-31 17:59:51 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:05:50 +0200
commit3f736cd3db63f106eac02f220477b4a0f3b0eceb (patch)
tree80afa73f8c4d281b2fccba8ad2baa7c10f7e7e84 /src/containers/map/layers
parentb17f1d8cb4815f57a4b7043cc91b867ec3cbc867 (diff)
Implement room creation
Diffstat (limited to 'src/containers/map/layers')
-rw-r--r--src/containers/map/layers/HoverTileLayer.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/containers/map/layers/HoverTileLayer.js b/src/containers/map/layers/HoverTileLayer.js
new file mode 100644
index 00000000..b8868233
--- /dev/null
+++ b/src/containers/map/layers/HoverTileLayer.js
@@ -0,0 +1,23 @@
+import {connect} from "react-redux";
+import {toggleTileAtLocation} from "../../../actions/topology";
+import HoverTileLayerComponent from "../../../components/map/layers/HoverTileLayerComponent";
+
+const mapStateToProps = state => {
+ return {
+ currentRoomInConstruction: state.currentRoomInConstruction,
+ isValid: (x, y) => true, // TODO implement proper validation
+ };
+};
+
+const mapDispatchToProps = dispatch => {
+ return {
+ onClick: (x, y) => dispatch(toggleTileAtLocation(x, y)),
+ };
+};
+
+const HoverTileLayer = connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(HoverTileLayerComponent);
+
+export default HoverTileLayer;