| 25 | } |
| 26 | |
| 27 | renderZeroModel(zeroPosition: number, vertical: boolean): LineModel[] { |
| 28 | const zeroPixel = crispPixel(0); |
| 29 | const position = crispPixel(zeroPosition); |
| 30 | |
| 31 | let model: LineModel; |
| 32 | |
| 33 | if (vertical) { |
| 34 | model = { |
| 35 | type: 'line', |
| 36 | x: position, |
| 37 | y: zeroPixel, |
| 38 | x2: position, |
| 39 | y2: crispPixel(this.rect.height), |
| 40 | strokeStyle: 'rgba(0, 0, 0, 0.5)', |
| 41 | }; |
| 42 | } else { |
| 43 | model = { |
| 44 | type: 'line', |
| 45 | x: zeroPixel, |
| 46 | y: position, |
| 47 | x2: crispPixel(this.rect.width), |
| 48 | y2: position, |
| 49 | strokeStyle: 'rgba(0, 0, 0, 0.5)', |
| 50 | }; |
| 51 | } |
| 52 | |
| 53 | return [model]; |
| 54 | } |
| 55 | } |