WeaponDamageChart wrapped in div instead of span

This commit is contained in:
felixlinker
2018-08-31 15:02:44 +02:00
parent 8a386c4ece
commit ec70ad5d29

View File

@@ -74,7 +74,7 @@ export default class WeaponDamageChart extends TranslatedComponent {
* Calculate the maximum range of a ship's weapons * Calculate the maximum range of a ship's weapons
* @param {Object} ship The ship * @param {Object} ship The ship
* @returns {int} The maximum range, in metres * @returns {int} The maximum range, in metres
*/ */
_calcMaxRange(ship) { _calcMaxRange(ship) {
let maxRange = 1000; // Minimum let maxRange = 1000; // Minimum
for (let i = 0; i < ship.hardpoints.length; i++) { for (let i = 0; i < ship.hardpoints.length; i++) {
@@ -184,7 +184,7 @@ export default class WeaponDamageChart extends TranslatedComponent {
const code = `${ship.toString()}:${opponent.toString()}`; const code = `${ship.toString()}:${opponent.toString()}`;
return ( return (
<span> <div>
<LineChart <LineChart
xMax={maxRange} xMax={maxRange}
yMax={this.state.maxDps} yMax={this.state.maxDps}
@@ -198,7 +198,7 @@ export default class WeaponDamageChart extends TranslatedComponent {
points={200} points={200}
code={code} code={code}
/> />
</span> </div>
); );
} }
} }