diff --git a/web/src/features/dev/debug/radial.ts b/web/src/features/dev/debug/radial.ts index a05ad18..d50d1e8 100644 --- a/web/src/features/dev/debug/radial.ts +++ b/web/src/features/dev/debug/radial.ts @@ -7,7 +7,6 @@ export const debugRadial = () => { action: 'openRadialMenu', data: { items: [ - // TODO: Fix wheel being broken when there's only one item { icon: 'palette', label: 'Paint' }, { icon: 'warehouse', label: 'Garage' }, { icon: 'palette', label: 'Quite long text' }, diff --git a/web/src/features/menu/radial/index.tsx b/web/src/features/menu/radial/index.tsx index 31b6ec7..f9f966f 100644 --- a/web/src/features/menu/radial/index.tsx +++ b/web/src/features/menu/radial/index.tsx @@ -79,13 +79,12 @@ const RadialMenu: React.FC = () => { {/*Fixed issues with background circle extending the circle when there's less than 3 items*/} - {menu.items.length >= 3 && ( - - - - )} + + + {menu.items.map((item, index) => { - const pieAngle = 360 / menu.items.length; + // Always draw full circle to avoid elipse circles with 2 or less items + const pieAngle = 360 / (menu.items.length < 3 ? 3 : menu.items.length); const angle = degToRad(pieAngle / 2 + 90); const radius = 175 * 0.65; const iconX = 175 + Math.sin(angle) * radius;