mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-10 23:01:53 +02:00
Fix shape direction.
This commit is contained in:
parent
233572f2d9
commit
5a54e2ca2a
2 changed files with 3 additions and 3 deletions
|
@ -40,7 +40,7 @@ class Shape:
|
||||||
offset: np.array # vector that should be used to shift the path
|
offset: np.array # vector that should be used to shift the path
|
||||||
id_: str # shape identifier
|
id_: str # shape identifier
|
||||||
name: Optional[str] = None # icon description
|
name: Optional[str] = None # icon description
|
||||||
directed: Optional[bool] = None
|
is_right_directed: Optional[bool] = None
|
||||||
emojis: Set[str] = field(default_factory=set)
|
emojis: Set[str] = field(default_factory=set)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -55,7 +55,7 @@ class Shape:
|
||||||
shape = cls(path, offset, id_, name)
|
shape = cls(path, offset, id_, name)
|
||||||
|
|
||||||
if "right_directed" in structure:
|
if "right_directed" in structure:
|
||||||
shape.right_directed = structure["right_directed"]
|
shape.is_right_directed = structure["right_directed"]
|
||||||
|
|
||||||
if "emoji" in structure:
|
if "emoji" in structure:
|
||||||
emojis = structure["emojis"]
|
emojis = structure["emojis"]
|
||||||
|
|
|
@ -361,7 +361,7 @@ class Scheme:
|
||||||
if key in tags:
|
if key in tags:
|
||||||
if DirectionSet(tags[key]).is_right() is False:
|
if DirectionSet(tags[key]).is_right() is False:
|
||||||
for specification in main_icon.shape_specifications:
|
for specification in main_icon.shape_specifications:
|
||||||
if specification.shape.is_right_directed:
|
if specification.shape.is_right_directed is True:
|
||||||
specification.flip_horizontally = True
|
specification.flip_horizontally = True
|
||||||
|
|
||||||
return returned, priority
|
return returned, priority
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue