from retail
This commit is contained in:
@@ -104,6 +104,7 @@ end
|
||||
|
||||
local function create(parent)
|
||||
local region = CreateFrame("FRAME", nil, parent)
|
||||
region.regionType = "dynamicgroup"
|
||||
region:SetSize(16, 16)
|
||||
region:SetMovable(true)
|
||||
region.sortedChildren = {}
|
||||
@@ -116,6 +117,13 @@ local function create(parent)
|
||||
region.controlPoints.parent = region
|
||||
WeakAuras.regionPrototype.create(region)
|
||||
region.suspended = 0
|
||||
|
||||
local oldSetFrameLevel = region.SetFrameLevel
|
||||
region.SetFrameLevel = function(self, level)
|
||||
oldSetFrameLevel(self, level)
|
||||
self.background:SetFrameLevel(level)
|
||||
end
|
||||
|
||||
return region
|
||||
end
|
||||
|
||||
@@ -855,6 +863,7 @@ local function modify(parent, region, data)
|
||||
else
|
||||
childRegion:SetFrameStrata(Private.frame_strata_types[childData.frameStrata]);
|
||||
end
|
||||
Private.ApplyFrameLevel(childRegion)
|
||||
return regionData
|
||||
end
|
||||
|
||||
@@ -1191,7 +1200,7 @@ local function modify(parent, region, data)
|
||||
-- if self.dynamicAnchor then self:UpdateBorder(); return end
|
||||
Private.StartProfileSystem("dynamicgroup")
|
||||
Private.StartProfileAura(data.id)
|
||||
local numVisible, minX, maxX, maxY, minY, minLevel = 0
|
||||
local numVisible, minX, maxX, maxY, minY = 0
|
||||
for active, regionData in ipairs(self.sortedChildren) do
|
||||
if regionData.shown then
|
||||
numVisible = numVisible + 1
|
||||
@@ -1199,14 +1208,12 @@ local function modify(parent, region, data)
|
||||
local regionLeft, regionRight, regionTop, regionBottom
|
||||
= SafeGetPos(childRegion, childRegion.GetLeft), SafeGetPos(childRegion, childRegion.GetRight),
|
||||
SafeGetPos(childRegion, childRegion.GetTop), SafeGetPos(childRegion, childRegion.GetBottom)
|
||||
local frameLevel = childRegion:GetFrameLevel()
|
||||
|
||||
if(regionLeft and regionRight and regionTop and regionBottom and frameLevel) then
|
||||
if(regionLeft and regionRight and regionTop and regionBottom) then
|
||||
minX = minX and min(regionLeft, minX) or regionLeft
|
||||
maxX = maxX and max(regionRight, maxX) or regionRight
|
||||
minY = minY and min(regionBottom, minY) or regionBottom
|
||||
maxY = maxY and max(regionTop, maxY) or regionTop
|
||||
minLevel = minLevel and min(frameLevel, minLevel) or frameLevel
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1223,7 +1230,6 @@ local function modify(parent, region, data)
|
||||
self:SetHeight(height)
|
||||
self.currentWidth = width
|
||||
self.currentHeight = height
|
||||
self.background:SetFrameLevel(minLevel and minLevel - 1 or 0)
|
||||
else
|
||||
self:Hide()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user