diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2023-03-26 21:49:26 +0100 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2023-03-27 20:31:30 +0100 |
| commit | efe1cebb4c1d8f07c0f1afb8bf08732d9fe20125 (patch) | |
| tree | fd28183bb8754810403b4ef0e61f1a2088a8a29b /opendc-web/opendc-web-ui/src/components/topologies/map/layers/ObjectHoverLayer.js | |
| parent | a9da76621c1be7a11bf292e868a8f7c22f2ea203 (diff) | |
bug(web): Do not offset hover layer after dragging
This change fixes #136 which reported that the grid and cursor will fall
out of sync when dragging or moving the grid when placing rooms or
objects.
Fixes #136
Diffstat (limited to 'opendc-web/opendc-web-ui/src/components/topologies/map/layers/ObjectHoverLayer.js')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/components/topologies/map/layers/ObjectHoverLayer.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/opendc-web/opendc-web-ui/src/components/topologies/map/layers/ObjectHoverLayer.js b/opendc-web/opendc-web-ui/src/components/topologies/map/layers/ObjectHoverLayer.js index 1f00de36..5e741a3b 100644 --- a/opendc-web/opendc-web-ui/src/components/topologies/map/layers/ObjectHoverLayer.js +++ b/opendc-web/opendc-web-ui/src/components/topologies/map/layers/ObjectHoverLayer.js @@ -27,7 +27,7 @@ import { findTileWithPosition } from '../../../../util/tile-calculations' import HoverLayerComponent from './HoverLayerComponent' import TilePlusIcon from '../elements/TilePlusIcon' -function ObjectHoverLayer() { +export default function ObjectHoverLayer() { const isEnabled = useSelector((state) => state.construction.inRackConstructionMode) const isValid = useSelector((state) => (x, y) => { if (state.interactionLevel.mode !== 'ROOM') { @@ -49,5 +49,3 @@ function ObjectHoverLayer() { </HoverLayerComponent> ) } - -export default ObjectHoverLayer |
