Skip to content

Commit

Permalink
fix #232
Browse files Browse the repository at this point in the history
  • Loading branch information
moody committed Oct 3, 2024
1 parent 69bf7ea commit d1f4f8a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ui/minimap-icon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ local function getAnchors(frame)
return vhalf .. hhalf, frame, (vhalf == "TOP" and "BOTTOM" or "TOP") .. hhalf
end

--- @param frame Frame
local function onUpdateTooltip(frame)
Tooltip:SetOwner(frame, "ANCHOR_NONE")
Tooltip:SetPoint(getAnchors(frame))
Tooltip:ClearLines()

if IsAltKeyDown() then
local item = JunkFilter:GetNextDestroyableJunkItem()
Expand Down Expand Up @@ -74,7 +74,9 @@ EventManager:Once(E.StoreCreated, function()

--- @param frame Frame|any
OnEnter = function(frame)
-- GameTooltip will repeatedly call `UpdateTooltip()` on the frame passed to `SetOwner()`.
-- Tooltip will repeatedly call `UpdateTooltip()` on the frame when passed to `SetOwner()`.
Tooltip:SetOwner(frame, "ANCHOR_NONE")
Tooltip:SetPoint(getAnchors(frame))
frame.UpdateTooltip = onUpdateTooltip
frame:UpdateTooltip()
end,
Expand Down

0 comments on commit d1f4f8a

Please sign in to comment.