Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions src/components/Match/VisionMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
extractTransitionClasses,
} from 'utility';
import Measure from 'react-measure';
import strings from 'lang';
import styles from './Match.css';

// with the actual game size, the width parameters is optional
Expand All @@ -20,23 +21,27 @@ const style = (width, iconSize, ward) => {
const WardLogPin = ({ width, iconSize, log }) => {
const stroke = log.entered.player_slot < 5 ? styles.green : styles.red;
const fill = log.type === 'observer' ? styles.yelor : styles.blue;

const strokeWidth = log.type === 'observer' ? '2.5' : '2';
const wardSize = log.type === 'observer' ? iconSize * (1600 / 850) : iconSize;

return (
<svg
style={style(width, iconSize, log.entered)}
width={iconSize}
height={iconSize}
style={style(width, wardSize, log.entered)}
width={wardSize}
height={wardSize}
xmlns="http://www.w3.org/2000/svg"
>
<g>
<title>Observer</title>
<title>{log.type === 'observer' ? strings.th_ward_observer : strings.th_ward_sentry}</title>
<circle
fill={fill}
strokeWidth="2"
strokeWidth={strokeWidth}
stroke={stroke}
r={iconSize * 0.4}
cy={iconSize / 2}
cx={iconSize / 2}
fillOpacity="0.4"
r={wardSize * 0.4}
cy={wardSize / 2}
cx={wardSize / 2}
fillOpacity="0.3"
/>
</g>
<defs>
Expand Down
5 changes: 1 addition & 4 deletions src/components/Match/matchPages.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,7 @@ const matchPages = [Overview, {
name: strings.tab_vision,
key: 'vision',
parsed: true,
content: match => (<div>
<Heading title={strings.heading_vision} />
<VisionPage match={match} />
</div>),
content: match => <VisionPage match={match} />,
}, {
name: strings.tab_actions,
key: 'actions',
Expand Down