Skip to content

Title Text component: "Text layout" setting causes error when set to Left #102

@tassaron

Description

@tassaron

Changing the Title Text "text layout" setting to "left" causes this error:

Traceback:
  File "avp/libcomponent/metaclass.py", line 38, in renderWrapper
    return func(self, *args, **kwargs)

  File "avp/components/text.py", line 118, in previewRender
    return self.addText(self.width, self.height)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^

  File "avp/components/text.py", line 153, in addText
    x, y = self.getXY()
           ~~~~~~~~~~^^

  File "avp/components/text.py", line 99, in getXY
    raise ValueError(f"Alignment value {self.alignment} unknown")

Which is unsurprising because the code only checks for two options even though there are three. Should be simple to fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions