Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 49x 49x 186x 20x 20x 34x 16x | import { Injectable } from "@angular/core" import { CodeMapBuilding } from "../../ui/codeMap/rendering/codeMapBuilding" @Injectable({ providedIn: "root" }) export class IdToBuildingService { private idToBuilding = new Map<number, CodeMapBuilding>() setIdToBuilding(buildings: CodeMapBuilding[]) { this.idToBuilding = new Map<number, CodeMapBuilding>() for (const building of buildings) { this.idToBuilding.set(building.node.id, building) } } /** id is buildings' node.id */ get(id: number) { return this.idToBuilding.get(id) } } |