MCPcopy Create free account
hub / github.com/facebook/Rapid / cacheIssue

Method cacheIssue

modules/core/ValidationSystem.js:844–865  ·  view source on GitHub ↗
(issue)

Source from the content-addressed store, hash-verified

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) {

Callers 1

cacheIssuesMethod · 0.95

Calls 3

uncacheIssueMethod · 0.95
getMethod · 0.80
extentMethod · 0.45

Tested by

no test coverage detected