(
sectionId: number, sectionCountInput: PatternFactoryInput,
knittingStyleInput: PatternFactoryInput)
| 13 | knittingStyleInput: PatternFactoryInput; |
| 14 | |
| 15 | constructor( |
| 16 | sectionId: number, sectionCountInput: PatternFactoryInput, |
| 17 | knittingStyleInput: PatternFactoryInput) { |
| 18 | this.widthTop = new PatternFactoryInput( |
| 19 | `${sectionId}: Top Width`, |
| 20 | `How wide should section ${sectionId} be at the top?`, 3, 'stitches'); |
| 21 | this.widthBottom = new PatternFactoryInput( |
| 22 | `${sectionId}: Bottom Width`, |
| 23 | `How wide should section ${sectionId} be at the bottom?`, 30, |
| 24 | 'stitches'); |
| 25 | this.texture = new PatternFactoryInput( |
| 26 | `${sectionId}: Texture`, |
| 27 | `What type of pattern should section ${sectionId} use?`, 'Stockinette', |
| 28 | null, Array.from(texturesMap.keys())); |
| 29 | this.inputs = [this.widthTop, this.widthBottom, this.texture]; |
| 30 | this.knittingStyleInput = knittingStyleInput; |
| 31 | this.inputs.forEach( |
| 32 | (i) => i.addVisibilityRequirement( |
| 33 | () => sectionCountInput.numberValue() > sectionId)); |
| 34 | sectionCountInput.listener.addListener( |
| 35 | () => this.inputs.forEach((i) => i.adjustVisibility())); |
| 36 | } |
| 37 | |
| 38 | getInputs(): PatternFactoryInput[] { |
| 39 | return this.inputs; |
nothing calls this directly
no test coverage detected