Skip to content

Commit

Permalink
fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
TimGoll committed Feb 9, 2025
1 parent f64ef61 commit 2a81577
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,14 @@ end
-- @internal
-- @realm client
function PANEL:TriggerOnWithBase(eventName, ...)
local returnValue
self:TriggerOn(eventName, ...)
local returnValue = self:TriggerOn(eventName, ...)

if returnValue ~= nil then
return returnValue
end

if isfunction(self["On" .. eventName]) then
local returnValue = self["On" .. eventName](self, ...)
returnValue = self["On" .. eventName](self, ...)

if returnValue ~= nil then
return returnValue
Expand Down Expand Up @@ -1203,7 +1202,7 @@ function PANEL:OnRebuildLayout(w, h)
end
end

local descriptionLines, heightDescription
local descriptionLines, heightDescription, heightDescriptionLine

-- HANDLE DESCRIPTION WORD WRAP
if self:HasDescription() then
Expand All @@ -1220,6 +1219,8 @@ function PANEL:OnRebuildLayout(w, h)
self:GetDescriptionFont()
)

_, heightDescriptionLine = draw.GetTextSize(descriptionLines[1], self:GetDescriptionFont())

self:SetTranslatedDescriptionLines(descriptionLines)
end

Expand Down Expand Up @@ -1350,9 +1351,6 @@ function PANEL:OnRebuildLayout(w, h)
end

if self:HasDescription() then
local _, heightDescriptionLine =
draw.GetTextSize(descriptionLines[1], self:GetDescriptionFont())

-- move text out of the way
if ver == TEXT_ALIGN_TOP then
if self:HasText() then
Expand Down

0 comments on commit 2a81577

Please sign in to comment.