mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-25 05:57:12 +02:00
Merge main.
This commit is contained in:
commit
518e8f9590
14 changed files with 192 additions and 102 deletions
|
@ -351,14 +351,14 @@ class Constructor:
|
|||
)
|
||||
self.figures.append(figure)
|
||||
|
||||
processed: set[str] = set()
|
||||
processed: Set[str] = set()
|
||||
priority: int
|
||||
icon_set: IconSet
|
||||
icon_set, priority = self.scheme.get_icon(
|
||||
self.extractor, line.tags, processed, self.configuration
|
||||
)
|
||||
if icon_set is not None:
|
||||
labels: list[Label] = self.text_constructor.construct_text(
|
||||
labels: List[Label] = self.text_constructor.construct_text(
|
||||
line.tags, processed, self.configuration.label_mode
|
||||
)
|
||||
point: Point = Point(
|
||||
|
@ -529,6 +529,10 @@ class Constructor:
|
|||
)
|
||||
self.points.append(point)
|
||||
|
||||
def get_sorted_figures(self) -> List[StyledFigure]:
|
||||
"""Get all figures sorted by priority."""
|
||||
return sorted(self.figures, key=lambda x: x.line_style.priority)
|
||||
|
||||
|
||||
def check_level_number(tags: Tags, level: float) -> bool:
|
||||
"""Check if element described by tags is no the specified level."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue