From: Daniel Karbach Date: Thu, 29 May 2025 15:35:08 +0000 (+0200) Subject: feature toggles X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=4882bae444db704b3d7319941245ec8acdf6edc8;p=alttp.git feature toggles --- diff --git a/resources/js/components/zootr/MixedPoolsTracker.js b/resources/js/components/zootr/MixedPoolsTracker.js index 0c1e82f..fd4432b 100644 --- a/resources/js/components/zootr/MixedPoolsTracker.js +++ b/resources/js/components/zootr/MixedPoolsTracker.js @@ -2834,6 +2834,12 @@ const MixedPoolsTracker = () => { const [connections, setConnections] = React.useState({}); const [dragging, setDragging] = React.useState(null); + const [showConnectors, setShowConnectors] = React.useState(true); + const [showEntrances, setShowEntrances] = React.useState(true); + const [showLabels, setShowLabels] = React.useState(true); + const [showMaps, setShowMaps] = React.useState(true); + const [showWarps, setShowWarps] = React.useState(true); + const setConnection = React.useCallback((src, dst) => { setConnections((c) => { const newConn = { ...c }; @@ -3125,8 +3131,9 @@ const MixedPoolsTracker = () => { pointerEvents="none" x={map.bg.pos.x} y={map.bg.pos.y} width={map.bg.size.x} + style={{ opacity: showMaps ? 1 : 0.25 }} /> - {map.labelPos ? + {map.labelPos && showLabels ? { {map.short} : null} - {map.entrances.map((entrance) => + {showEntrances ? map.entrances.map((entrance) => - )} + ) : null} )} - - {connectors.map((c) => - - )} - - - {annotations.map((a) => - - )} - + {showConnectors ? + + {connectors.map((c) => + + )} + + : null} + {showWarps ? + + {annotations.map((a) => + + )} + + : null} +
+ + + + + +
; };