remove getStateLable function from labels.ts

This commit is contained in:
StempunkDev 2026-03-27 20:40:20 +01:00
parent 9b4add5071
commit baeab354b6
2 changed files with 1 additions and 7 deletions

View file

@ -18,7 +18,7 @@ function extractPathPoints(pathElement) {
function getLabelData(textElement) {
const id = textElement.id || "";
if (id.startsWith("stateLabel")) {
return Labels.getStateLabel(+id.slice(10));
return Labels.get(+id.slice(10));
}
// Custom labels: check for existing data-label-id attribute
const dataLabelId = textElement.getAttribute("data-label-id");

View file

@ -66,12 +66,6 @@ class LabelsModule {
);
}
getStateLabel(stateId: number): StateLabelData | undefined {
return pack.labels.find(
(l) => l.type === "state" && l.stateId === stateId,
) as StateLabelData | undefined;
}
getBurgLabel(burgId: number): BurgLabelData | undefined {
return pack.labels.find((l) => l.type === "burg" && l.burgId === burgId) as
| BurgLabelData