(scrollIntoView: boolean = false)
| 192 | } |
| 193 | |
| 194 | private updateSelection(scrollIntoView: boolean = false): void { |
| 195 | const mkVisible = new ViewElements(this.divNode.parentNode as HTMLElement); |
| 196 | for (const [sp, els] of this.sourcePositionToHtmlElements.entries()) { |
| 197 | const isSelected = this.sourcePositionSelection.isKeySelected(sp); |
| 198 | for (const el of els) { |
| 199 | mkVisible.consider(el, isSelected); |
| 200 | el.classList.toggle("selected", isSelected); |
| 201 | } |
| 202 | } |
| 203 | mkVisible.apply(scrollIntoView); |
| 204 | } |
| 205 | |
| 206 | private getCodeHtmlElementName(): string { |
| 207 | return `source-pre-${this.source.sourceId}`; |
no test coverage detected