|
|
@@ -53,17 +53,21 @@ export class MatchDetailsPage implements OnInit { |
|
|
|
var theta = [0, Math.PI / 6, Math.PI / 4, Math.PI / 3, Math.PI / 2, 2 * (Math.PI / 3), 3 * (Math.PI / 4), 5 * (Math.PI / 6), Math.PI, 7 * (Math.PI / 6), 5 * (Math.PI / 4), 4 * (Math.PI / 3), 3 * (Math.PI / 2), 5 * (Math.PI / 3), 7 * (Math.PI / 4), 11 * (Math.PI / 6)]; |
|
|
|
|
|
|
|
|
|
|
|
// for (let i = 1; i < 12; i += 1) { |
|
|
|
// this.matchData.home.players.push({ |
|
|
|
// name: 'Player ' + i.toString(), |
|
|
|
// image: 'assets/home-team/roster/' + i.toString() + '.png', |
|
|
|
// jersey: i.toString(), |
|
|
|
// position: { |
|
|
|
// x: Math.round(radius * (Math.cos(theta[i]))), |
|
|
|
// y: i*10, |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
for (let i = 1; i < 12; i += 1) { |
|
|
|
this.matchData.home.players.push({ |
|
|
|
name: 'Player ' + i.toString(), |
|
|
|
image: 'assets/home-team/roster/' + i.toString() + '.png', |
|
|
|
jersey: i.toString(), |
|
|
|
position: { |
|
|
|
x: Math.round((45) * (Math.cos(theta[i]))), |
|
|
|
y: Math.round((40) * (Math.sin(theta[i]))), |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
getPosition(position) { |
|
|
|
return ((90 / 2) - parseInt(position)); |
|
|
|
} |
|
|
|
|
|
|
|
back() { |
|
|
|