Add option background_image_anchor to configure bgimage position
This commit is contained in:
Generated
+8
@@ -57,6 +57,14 @@ class Parser:
|
||||
def background_image(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
ans['background_image'] = config_or_absolute_path(val)
|
||||
|
||||
def background_image_anchor(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
val = val.lower()
|
||||
if val not in self.choices_for_background_image_anchor:
|
||||
raise ValueError(f"The value {val} is not a valid choice for background_image_anchor")
|
||||
ans["background_image_anchor"] = val
|
||||
|
||||
choices_for_background_image_anchor = frozenset(('northwest', 'north', 'northeast', 'east', 'southeast', 'south', 'southwest', 'west', 'center'))
|
||||
|
||||
def background_image_layout(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
val = val.lower()
|
||||
if val not in self.choices_for_background_image_layout:
|
||||
|
||||
Reference in New Issue
Block a user