mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
centered hud for your brain
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
||||
<title>Multi Roomba Rover</title>
|
||||
<script type="module" crossorigin src="/assets/index-CEVMLwfj.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-Cge0aRRk.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-5vqbgc7L.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -51,7 +51,7 @@ export default function VideoTile({
|
||||
hudVariant = 'default',
|
||||
driverLabel = null,
|
||||
hudForceMap = false,
|
||||
hudMapPosition = 'top-right',
|
||||
hudMapPosition = 'top-center',
|
||||
hudLabelScale = 1,
|
||||
fitParent = false,
|
||||
overcurrentLimiter = null,
|
||||
@@ -581,7 +581,7 @@ function HudOverlay({
|
||||
battery,
|
||||
showTopDown = false,
|
||||
mobileHud = false,
|
||||
mapPosition = 'top-right',
|
||||
mapPosition = 'top-center',
|
||||
turnTimerText = null,
|
||||
labelScale = 1,
|
||||
}) {
|
||||
@@ -616,10 +616,13 @@ function HudOverlay({
|
||||
width: mapSize,
|
||||
height: mapSize,
|
||||
opacity: mapOpacity,
|
||||
transform: `scale(${mapScale})`,
|
||||
transformOrigin: mapPosition === 'bottom-left' ? 'bottom left' : 'top right',
|
||||
transform: mapPosition === 'top-center' ? `translateX(-50%) scale(${mapScale})` : `scale(${mapScale})`,
|
||||
transformOrigin:
|
||||
mapPosition === 'bottom-left' ? 'bottom left' : mapPosition === 'top-center' ? 'top center' : 'top right',
|
||||
...(mapPosition === 'bottom-left'
|
||||
? { left: '0.25rem', bottom: '0.25rem' }
|
||||
: mapPosition === 'top-center'
|
||||
? { left: '50%', top: '0.25rem' }
|
||||
: { right: '0.25rem', top: '0.25rem' }),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user