mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-04-05 23:17:24 +02:00
remove getStateLable function from labels.ts
This commit is contained in:
parent
9b4add5071
commit
baeab354b6
2 changed files with 1 additions and 7 deletions
|
|
@ -18,7 +18,7 @@ function extractPathPoints(pathElement) {
|
||||||
function getLabelData(textElement) {
|
function getLabelData(textElement) {
|
||||||
const id = textElement.id || "";
|
const id = textElement.id || "";
|
||||||
if (id.startsWith("stateLabel")) {
|
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
|
// Custom labels: check for existing data-label-id attribute
|
||||||
const dataLabelId = textElement.getAttribute("data-label-id");
|
const dataLabelId = textElement.getAttribute("data-label-id");
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
getBurgLabel(burgId: number): BurgLabelData | undefined {
|
||||||
return pack.labels.find((l) => l.type === "burg" && l.burgId === burgId) as
|
return pack.labels.find((l) => l.type === "burg" && l.burgId === burgId) as
|
||||||
| BurgLabelData
|
| BurgLabelData
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue