chore(textwidget): fail if position is wrong
This commit is contained in:
parent
44781ba325
commit
0ce811fa97
1 changed files with 2 additions and 0 deletions
|
@ -80,6 +80,8 @@ function TextWidget:drawCanvas()
|
|||
w = self:getPadding()
|
||||
elseif (complexLabel.position == "right") then
|
||||
w = math.floor(self.width - self:getPadding())
|
||||
else
|
||||
error("Position " .. complexLabel.position .. " is unknown for label " .. complexLabel.label)
|
||||
end
|
||||
font:draw(complexLabel.label, w, h, -1, complexLabel.position)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue