Skip to content

Commit 2244c84

Browse files
committed
Refactor documentation for addBorder and getRelativePosition methods in VisualElement class
1 parent b96875a commit 2244c84

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/elements/VisualElement.lua

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -889,10 +889,9 @@ function VisualElement:isFocused()
889889
return self:hasState("focused")
890890
end
891891

892-
--- Adds or updates a drawable character border around the element using the canvas plugin.
893-
--- The border will automatically adapt to size/background changes because the command
894-
--- reads current properties each render.
895-
-- @param colorOrOptions any Border color or options table
892+
--- Adds or updates a drawable character border around the element using the canvas plugin. The border will automatically adapt to size/background changes because the command reads current properties each render.
893+
--- @param colorOrOptions any Border color or options table
894+
--- @param sideOptions? table Side options table (if color is provided as first argument)
896895
--- @return VisualElement self
897896
function VisualElement:addBorder(colorOrOptions, sideOptions)
898897
local col = nil
@@ -1002,10 +1001,10 @@ end
10021001

10031002
--- Returns the relative position of the element or the given coordinates.
10041003
--- @shortDescription Returns the relative position of the element
1005-
---@param x? number x position
1006-
---@param y? number y position
1007-
---@return number x The relative x position
1008-
---@return number y The relative y position
1004+
--- @param x? number x position
1005+
--- @param y? number y position
1006+
--- @return number x The relative x position
1007+
--- @return number y The relative y position
10091008
function VisualElement:getRelativePosition(x, y)
10101009
if (x == nil) or (y == nil) then
10111010
x, y = self.get("x"), self.get("y")

0 commit comments

Comments
 (0)