(issue)
| 842 | |
| 843 | |
| 844 | cacheIssue(issue) { |
| 845 | if (this.issues.has(issue.id)) { |
| 846 | this.uncacheIssue(issue); |
| 847 | } |
| 848 | |
| 849 | if (issue.type === 'disconnected_way' || issue.type === 'impossible_oneway') { |
| 850 | const extent = issue.extent(this.graph); |
| 851 | const box = Object.assign({ issueID: issue.id }, extent.bbox()); |
| 852 | this.recheckRBush.insert(box); |
| 853 | this.recheckBoxes.set(issue.id, box); |
| 854 | } |
| 855 | |
| 856 | for (const entityID of issue.entityIds ?? []) { |
| 857 | let issueIDs = this.entityIssueIDs.get(entityID); |
| 858 | if (!issueIDs) { |
| 859 | issueIDs = new Set(); |
| 860 | this.entityIssueIDs.set(entityID, issueIDs); |
| 861 | } |
| 862 | issueIDs.add(issue.id); |
| 863 | } |
| 864 | this.issues.set(issue.id, issue); |
| 865 | } |
| 866 | |
| 867 | |
| 868 | uncacheIssue(issue) { |
no test coverage detected