From 2244c843232b7e272b9f34187a6503fbf6041d91 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Mon, 27 Oct 2025 17:46:37 +0100 Subject: [PATCH] Refactor documentation for addBorder and getRelativePosition methods in VisualElement class --- src/elements/VisualElement.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/elements/VisualElement.lua b/src/elements/VisualElement.lua index 94fee64..6d4a8d5 100644 --- a/src/elements/VisualElement.lua +++ b/src/elements/VisualElement.lua @@ -889,10 +889,9 @@ function VisualElement:isFocused() return self:hasState("focused") end ---- 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. --- @param colorOrOptions any Border color or options table +--- 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. +--- @param colorOrOptions any Border color or options table +--- @param sideOptions? table Side options table (if color is provided as first argument) --- @return VisualElement self function VisualElement:addBorder(colorOrOptions, sideOptions) local col = nil @@ -1002,10 +1001,10 @@ end --- Returns the relative position of the element or the given coordinates. --- @shortDescription Returns the relative position of the element ----@param x? number x position ----@param y? number y position ----@return number x The relative x position ----@return number y The relative y position +--- @param x? number x position +--- @param y? number y position +--- @return number x The relative x position +--- @return number y The relative y position function VisualElement:getRelativePosition(x, y) if (x == nil) or (y == nil) then x, y = self.get("x"), self.get("y")