* Post that contains the panels. * @param {string} polePosition - Position of the poles on which to display the panels. * @param {number} [lanesWide=1] - How many lanes wide the post should appear to be.
(polePosition, lanesWide = 1)
| 5 | * @param {number} [lanesWide=1] - How many lanes wide the post should appear to be. |
| 6 | */ |
| 7 | constructor(polePosition, lanesWide = 1) { |
| 8 | if (this.polePositions.includes(polePosition)) { |
| 9 | this.polePosition = polePosition; |
| 10 | } else { |
| 11 | this.polePosition = this.polePositions[0]; |
| 12 | } |
| 13 | if (lanesWide >= 1 && lanesWide <= 6) { |
| 14 | this.lanesWide = lanesWide; |
| 15 | } else { |
| 16 | this.lanesWide = 1; |
| 17 | } |
| 18 | this.panels = []; |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * Create a new panel for the post. Add it to the end of the list of existing panels. |
nothing calls this directly
no outgoing calls
no test coverage detected