'saha',
],
x: 0.815,
- y: 0.42,
+ y: 0.465,
},
{
id: 'saha-hut',
'saha-right',
],
x: 0.815,
- y: 0.465,
+ y: 0.42,
},
{
id: 'sick-kid',
},
];
-const Location = ({ l, size }) => {
+const Location = ({ number, l, size }) => {
const { t } = useTranslation();
const classNames = ['location', `status-${l.status}`];
classNames.push(`size-${size}`);
}
- return <rect className={classNames.join(' ')} x={l.x} y={l.y}>
+ return <g className={classNames.join(' ')} transform={`translate(${l.x} ${l.y})`}>
<title>{t(`tracker.location.${l.id}`)}</title>
- </rect>;
+ <rect className="box" x="0" y="0" />
+ {number && l.cleared < l.total ?
+ <text className="text" x="0" y="0">{Math.max(0, l.total - l.cleared)}</text>
+ : null}
+ </g>;
};
Location.propTypes = {
+ number: PropTypes.bool,
l: PropTypes.shape({
id: PropTypes.string,
x: PropTypes.number,
<Location key={l.id} l={l} />
)}
{lwDungeons.map(l =>
- <Location key={l.id} l={l} size="lg" />
+ <Location key={l.id} number l={l} size="lg" />
)}
</g>
</g>
<Location key={l.id} l={l} />
)}
{dwDungeons.map(l =>
- <Location key={l.id} l={l} size="lg" />
+ <Location key={l.id} number l={l} size="lg" />
)}
</g>
</g>