From 685f04d5888774610ee7d7d5419c939d135595e3 Mon Sep 17 00:00:00 2001 From: Michael Copland Date: Mon, 7 Nov 2016 23:48:44 +0000 Subject: [PATCH 1/2] Resized ward minimap icons --- src/components/Match/VisionMap.jsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/Match/VisionMap.jsx b/src/components/Match/VisionMap.jsx index 0fbb6ef5c4..a7ae555ef6 100644 --- a/src/components/Match/VisionMap.jsx +++ b/src/components/Match/VisionMap.jsx @@ -20,7 +20,7 @@ import { const obsWard = (style, stroke, iconSize) => ( Observer - + @@ -32,7 +32,7 @@ const obsWard = (style, stroke, iconSize) => ( ( Sentry - + @@ -63,8 +63,9 @@ class VisionMap extends React.Component { const match = this.props.match; const width = this.props.width; const enabledIndex = this.state.enabledIndex; - const iconSize = width / 12; - const style = ward => ({ + const senSize = width / 12; + const obsSize = senSize * (1600/850); // 850 radius sentry, 1600 radius observer + const style = (ward, iconSize) => ({ position: 'absolute', top: ((width / 127) * ward.y) - (iconSize / 2), left: ((width / 127) * ward.x) - (iconSize / 2), @@ -77,8 +78,8 @@ class VisionMap extends React.Component { const obs = (match.players[index].posData && match.players[index].posData.obs) || []; const sen = (match.players[index].posData && match.players[index].posData.sen) || []; const stroke = isRadiant(match.players[index].player_slot) ? 'green' : 'red'; - obs.forEach(ward => obsIcons.push(obsWard(style(ward), stroke, iconSize))); - sen.forEach(ward => senIcons.push(senWard(style(ward), stroke, iconSize))); + obs.forEach(ward => obsIcons.push(obsWard(style(ward, obsSize), stroke, obsSize))); + sen.forEach(ward => senIcons.push(senWard(style(ward, senSize), stroke, senSize))); } } }); From 4384dfef69693a9e13db5290040e63820235f663 Mon Sep 17 00:00:00 2001 From: Michael Copland Date: Mon, 7 Nov 2016 23:51:32 +0000 Subject: [PATCH 2/2] Added player colours to ward minimap --- src/components/Match/VisionMap.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Match/VisionMap.jsx b/src/components/Match/VisionMap.jsx index a7ae555ef6..b52a7dc8cc 100644 --- a/src/components/Match/VisionMap.jsx +++ b/src/components/Match/VisionMap.jsx @@ -3,7 +3,7 @@ import Checkbox from 'material-ui/Checkbox'; import Visibility from 'material-ui/svg-icons/action/visibility'; import VisibilityOff from 'material-ui/svg-icons/action/visibility-off'; import { - isRadiant, + playerColors, // transformations, } from 'utility'; import Table from 'components/Table'; @@ -64,7 +64,7 @@ class VisionMap extends React.Component { const width = this.props.width; const enabledIndex = this.state.enabledIndex; const senSize = width / 12; - const obsSize = senSize * (1600/850); // 850 radius sentry, 1600 radius observer + const obsSize = senSize * (1600 / 850); // 850 radius sentry, 1600 radius observer const style = (ward, iconSize) => ({ position: 'absolute', top: ((width / 127) * ward.y) - (iconSize / 2), @@ -77,7 +77,7 @@ class VisionMap extends React.Component { if (match && match.players && match.players[index]) { const obs = (match.players[index].posData && match.players[index].posData.obs) || []; const sen = (match.players[index].posData && match.players[index].posData.sen) || []; - const stroke = isRadiant(match.players[index].player_slot) ? 'green' : 'red'; + const stroke = playerColors[match.players[index].player_slot]; obs.forEach(ward => obsIcons.push(obsWard(style(ward, obsSize), stroke, obsSize))); sen.forEach(ward => senIcons.push(senWard(style(ward, senSize), stroke, senSize))); }