From: Daniel Karbach Date: Fri, 5 Apr 2024 16:07:39 +0000 (+0200) Subject: remove some useless svg groups X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=31131fc56ecc52ba5ce8aa9854755b22620a7139;p=alttp.git remove some useless svg groups --- diff --git a/resources/js/components/common/ZeldaIcon.js b/resources/js/components/common/ZeldaIcon.js index 457e6e9..18b13eb 100644 --- a/resources/js/components/common/ZeldaIcon.js +++ b/resources/js/components/common/ZeldaIcon.js @@ -169,9 +169,8 @@ const ZeldaIcon = ({ name, svg, title }) => { href={isOnItemMap(strippedName) ? ITEM_MAP_URL : src} width={ITEM_MAP_WIDTH} height={ITEM_MAP_HEIGHT} - x="0" - y="0" - transform={`translate(-${clipX + 0.5} -${clipY + 0.5})`} + x={`-${clipX + 0.5}`} + y={`-${clipY + 0.5}`} clipPath={`xywh(${clipX + cropX} ${clipY + cropY} ${cropW} ${cropH})`} > {realTitle ? diff --git a/resources/js/components/tracker/Canvas.js b/resources/js/components/tracker/Canvas.js index fab1942..1258776 100644 --- a/resources/js/components/tracker/Canvas.js +++ b/resources/js/components/tracker/Canvas.js @@ -147,19 +147,16 @@ const Canvas = () => { {pins.map(pin => - - - + /> )} {dragging ? diff --git a/resources/js/components/tracker/Dungeons.js b/resources/js/components/tracker/Dungeons.js index 9c6e122..c6ed5c2 100644 --- a/resources/js/components/tracker/Dungeons.js +++ b/resources/js/components/tracker/Dungeons.js @@ -32,7 +32,7 @@ const Dungeons = ({ columns }) => { } ${row + 0.5})`; const transforms = { - tag: '', + tag: null, map: `translate(${mapX} 0) scale(0.9)`, compass: `translate(${compassX} 0) scale(0.9)`, small: `translate(${smallX} 0) scale(0.9)`, @@ -101,22 +101,20 @@ const Dungeons = ({ columns }) => { {dungeon.id.toUpperCase()} {shouldShowDungeonItem(config, 'Map') ? - - - + : null} {shouldShowDungeonItem(config, 'Compass') ? - - - + : null} {shouldShowDungeonItem(config, 'Small') ? @@ -132,13 +130,12 @@ const Dungeons = ({ columns }) => { : null} {shouldShowDungeonItem(config, 'Big') ? - - - + : null} { {dungeon.boss ? - - - + : null} {dungeon.prize ? - - - + : null} {dungeon.id === 'gt' && config.bossShuffle ? <> - - - - - - - - - + + + : null} )} diff --git a/resources/js/components/tracker/Items.js b/resources/js/components/tracker/Items.js index 2a9c01a..e991d0b 100644 --- a/resources/js/components/tracker/Items.js +++ b/resources/js/components/tracker/Items.js @@ -10,30 +10,54 @@ const Items = () => { const { state } = useTracker(); return <> - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + {state['mm-medallion'] === 'bombos' ? @@ -61,121 +85,156 @@ const Items = () => { TR : null} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + ; }; diff --git a/resources/js/components/tracker/ToggleIcon.js b/resources/js/components/tracker/ToggleIcon.js index 0d8afa4..6dee818 100644 --- a/resources/js/components/tracker/ToggleIcon.js +++ b/resources/js/components/tracker/ToggleIcon.js @@ -19,7 +19,7 @@ import { } from '../../helpers/tracker'; import { useTracker } from '../../hooks/tracker'; -const ToggleIcon = ({ controller, className, icons, svg }) => { +const ToggleIcon = ({ controller, className, icons, svg, transform }) => { const { setManualState, state } = useTracker(); const activeController = controller || ToggleIcon.nullController; const active = activeController.getActive(state, icons); @@ -48,6 +48,7 @@ const ToggleIcon = ({ controller, className, icons, svg }) => { e.preventDefault(); e.stopPropagation(); }} + transform={transform} > ; @@ -304,6 +305,7 @@ ToggleIcon.propTypes = { }), icons: PropTypes.arrayOf(PropTypes.string), svg: PropTypes.bool, + transform: PropTypes.string, }; export default ToggleIcon;