summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/components/topologies/map
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-ui/src/components/topologies/map')
-rw-r--r--opendc-web/opendc-web-ui/src/components/topologies/map/MapStage.js2
-rw-r--r--opendc-web/opendc-web-ui/src/components/topologies/map/MapStage.module.scss2
-rw-r--r--opendc-web/opendc-web-ui/src/components/topologies/map/RoomContainer.js10
3 files changed, 10 insertions, 4 deletions
diff --git a/opendc-web/opendc-web-ui/src/components/topologies/map/MapStage.js b/opendc-web/opendc-web-ui/src/components/topologies/map/MapStage.js
index 7b96f548..8bf529b2 100644
--- a/opendc-web/opendc-web-ui/src/components/topologies/map/MapStage.js
+++ b/opendc-web/opendc-web-ui/src/components/topologies/map/MapStage.js
@@ -15,7 +15,7 @@ import Toolbar from './controls/Toolbar'
function MapStage({ hotkeysRef }) {
const reduxContext = useContext(ReactReduxContext)
const stageRef = useRef(null)
- const { width = 100, height = 100 } = useResizeObserver({ ref: stageRef.current?.attrs?.container })
+ const { width = 500, height = 500 } = useResizeObserver({ ref: stageRef.current?.attrs?.container })
const [[x, y], setPos] = useState([0, 0])
const [scale, setScale] = useState(1)
diff --git a/opendc-web/opendc-web-ui/src/components/topologies/map/MapStage.module.scss b/opendc-web/opendc-web-ui/src/components/topologies/map/MapStage.module.scss
index d879b4c8..47c3dde2 100644
--- a/opendc-web/opendc-web-ui/src/components/topologies/map/MapStage.module.scss
+++ b/opendc-web/opendc-web-ui/src/components/topologies/map/MapStage.module.scss
@@ -24,8 +24,6 @@
background-color: var(--pf-global--Color--light-200);
position: relative;
display: flex;
- justify-content: center;
- align-items: center;
width: 100%;
height: 100%;
}
diff --git a/opendc-web/opendc-web-ui/src/components/topologies/map/RoomContainer.js b/opendc-web/opendc-web-ui/src/components/topologies/map/RoomContainer.js
index 191318ee..76785bea 100644
--- a/opendc-web/opendc-web-ui/src/components/topologies/map/RoomContainer.js
+++ b/opendc-web/opendc-web-ui/src/components/topologies/map/RoomContainer.js
@@ -36,7 +36,15 @@ function RoomContainer({ roomId, ...props }) {
return null
}
- return <RoomGroup {...props} interactionLevel={interactionLevel} currentRoomInConstruction={currentRoomInConstruction} room={room} onClick={() => dispatch(goFromBuildingToRoom(roomId))} />
+ return (
+ <RoomGroup
+ {...props}
+ interactionLevel={interactionLevel}
+ currentRoomInConstruction={currentRoomInConstruction}
+ room={room}
+ onClick={() => dispatch(goFromBuildingToRoom(roomId))}
+ />
+ )
}
RoomContainer.propTypes = {