Skip to content

Commit 3f9c8af

Browse files
committed
Resized ward pins
1 parent 12d663a commit 3f9c8af

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

src/components/Match/VisionMap.jsx

+14-9
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
extractTransitionClasses,
66
} from 'utility';
77
import Measure from 'react-measure';
8+
import strings from 'strings';
89
import styles from './Match.css';
910

1011
// with the actual game size, the width parameters is optional
@@ -20,23 +21,27 @@ const style = (width, iconSize, ward) => {
2021
const WardLogPin = ({ width, iconSize, log }) => {
2122
const stroke = log.entered.player_slot < 5 ? styles.green : styles.red;
2223
const fill = log.type === 'observer' ? styles.yelor : styles.blue;
24+
25+
const strokeWidth = log.type === 'observer' ? '2.5' : '2';
26+
const wardSize = log.type === 'observer' ? iconSize * (1600/850) : iconSize;
27+
2328
return (
2429
<svg
25-
style={style(width, iconSize, log.entered)}
26-
width={iconSize}
27-
height={iconSize}
30+
style={style(width, wardSize, log.entered)}
31+
width={wardSize}
32+
height={wardSize}
2833
xmlns="http://www.w3.org/2000/svg"
2934
>
3035
<g>
31-
<title>Observer</title>
36+
<title>{log.type === 'observer' ? strings.th_ward_observer : strings.th_ward_sentry}</title>
3237
<circle
3338
fill={fill}
34-
strokeWidth="2"
39+
strokeWidth={strokeWidth}
3540
stroke={stroke}
36-
r={iconSize * 0.4}
37-
cy={iconSize / 2}
38-
cx={iconSize / 2}
39-
fillOpacity="0.4"
41+
r={wardSize * 0.4}
42+
cy={wardSize / 2}
43+
cx={wardSize / 2}
44+
fillOpacity="0.3"
4045
/>
4146
</g>
4247
<defs>

src/components/Match/matchPages.jsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,7 @@ const matchPages = [Overview, {
141141
name: strings.tab_vision,
142142
key: 'vision',
143143
parsed: true,
144-
content: match => (<div>
145-
<Heading title={strings.heading_vision} />
146-
<VisionPage match={match} />
147-
</div>),
144+
content: match => <VisionPage match={match} />,
148145
}, {
149146
name: strings.tab_actions,
150147
key: 'actions',

0 commit comments

Comments
 (0)