()
| 6 | * Initialize the application. |
| 7 | */ |
| 8 | const init = function() { |
| 9 | // Create the post on which to place panels |
| 10 | post = new Post(Post.prototype.polePositions[0]); |
| 11 | |
| 12 | // Populate post position options |
| 13 | const postPositionSelectElmt = document.getElementById("postPosition"); |
| 14 | for (const polePosition of Post.prototype.polePositions) { |
| 15 | lib.appendOption(postPositionSelectElmt, polePosition, {selected : (polePosition == "Left")}); |
| 16 | } |
| 17 | |
| 18 | // Populate color options |
| 19 | const colorSelectElmt = document.getElementById("panelColor"); |
| 20 | for (const color in lib.colors) { |
| 21 | lib.appendOption(colorSelectElmt, color, {text : color}); |
| 22 | } |
| 23 | const cornerTypeSelectElmt = document.getElementById("panelCorner"); |
| 24 | for (const corner of Panel.prototype.cornerType) { |
| 25 | lib.appendOption(cornerTypeSelectElmt, corner, {selected : (corner == "Round")}); |
| 26 | } |
| 27 | |
| 28 | // Populate exit tab position options |
| 29 | const exitTabPositionSelectElmt = document.getElementById("exitTabPosition"); |
| 30 | for (const position of ExitTab.prototype.positions) { |
| 31 | lib.appendOption(exitTabPositionSelectElmt, position, {selected : (position == "Right")}); |
| 32 | } |
| 33 | |
| 34 | // Populate exit tab width options |
| 35 | const exitTabWidthSelectElmt = document.getElementById("exitTabWidth"); |
| 36 | for (const width of ExitTab.prototype.widths) { |
| 37 | lib.appendOption(exitTabWidthSelectElmt, width, {selected : (width == "Narrow")}); |
| 38 | } |
| 39 | |
| 40 | // Populate left options |
| 41 | const leftPositionElmt = document.getElementById("LeftPosition"); |
| 42 | for (const position of Sign.prototype.leftPositions) { |
| 43 | lib.appendOption(leftPositionElmt, position, {selected : (position == "Above")}) |
| 44 | } |
| 45 | |
| 46 | // Populate the shield position options |
| 47 | const shieldPositionsSelectElmt = document.getElementById("shieldsPosition"); |
| 48 | for (const position of Sign.prototype.shieldPositions) { |
| 49 | lib.appendOption(shieldPositionsSelectElmt, position, {selected : (position == "Above")}); |
| 50 | } |
| 51 | |
| 52 | // Populate the guide arrow options |
| 53 | const guideArrowSelectElmt = document.getElementById("guideArrow"); |
| 54 | for (const guideArrow of Sign.prototype.guideArrows) { |
| 55 | lib.appendOption(guideArrowSelectElmt, guideArrow); |
| 56 | } |
| 57 | |
| 58 | // Populate the exit only guide arrow options |
| 59 | const exitOnlyDirectionElmt = document.getElementById("exitOnlyDirection"); |
| 60 | for (const exitguideArrows of Sign.prototype.exitguideArrows) { |
| 61 | lib.appendOption(exitOnlyDirectionElmt, exitguideArrows); |
| 62 | } |
| 63 | |
| 64 | // Populate the arrow directions |
| 65 | const arrowDirectionElmt = document.getElementById("arrowLocations"); |
nothing calls this directly
no test coverage detected