Bug fixes.
Scott Sibley [09-17-10 - 19:08]
diff --git a/Modules/Bars.lua b/Modules/Bars.lua
index dcd54ef..ae1dbac 100644
--- a/Modules/Bars.lua
+++ b/Modules/Bars.lua
@@ -151,7 +151,7 @@ local intersectUpdate = function()
frame_cache[GetMouseFocus()] = true
end
for k, widget in pairs(mod.bars or {}) do
- if widget.config.intersect and type(widget.bar) == "table" and widget.bar.GetCenter then
+ if widget.config.intersect and type(widget.bar) == "table" then
for frame in pairs(frame_cache) do
if GetMouseFocus() ~= UIParent and environment.Intersect and environment.Intersect(frame, widget.bar) then
widget.hidden = true
diff --git a/Modules/Histograms.lua b/Modules/Histograms.lua
index 98dc0a7..2aea1db 100644
--- a/Modules/Histograms.lua
+++ b/Modules/Histograms.lua
@@ -205,13 +205,13 @@ local intersectUpdate = function()
frame_cache[GetMouseFocus()] = true
end
for k, widget in pairs(mod.histograms or {}) do
- for parent in pairs(frame_cache) do
- for i, bar in ipairs(widget.bars) do
- if widget.config.intersect and type(bar) == "table" and bar.GetCenter then
- if GetMouseFocus() ~= UIParent and environment.Intersect and environment.Intersect(GetMouseFocus(), bar) then
+ for i, bar in ipairs(widget.bars) do
+ for parent in pairs(frame_cache) do
+ if widget.config.intersect and type(bar) == "table" then
+ if environment.Intersect(parent, bar) then
widget.hidden = true
bar:Hide()
- elseif environment.Intersect and not environment.Intersect(GetMouseFocus(), bar) and widget.hidden then
+ elseif environment.Intersect(parent, bar) and widget.hidden then
widget.hidden = false
bar:Show()
end
diff --git a/Modules/Text.lua b/Modules/Text.lua
index 1fccbfb..95906b9 100644
--- a/Modules/Text.lua
+++ b/Modules/Text.lua
@@ -277,13 +277,13 @@ local intersectUpdate = function()
if GetMouseFocus() and GetMouseFocus() ~= UIParent then
frame_cache[GetMouseFocus()] = true
end
- for k, widget in pairs(mod.texts or {}) do
- for parent in pairs(frame_cache) do
- if widget.config.intersect and type(widget.text) == "table" and widget.text.GetCenter then
- if widget.config.intersect and environment.Intersect and environment.Intersect(parent, widget.text.fontstring) then
+ for k, widget in pairs(mod.texts) do
+ for parent in pairs(frame_cache) and type(widget.text) == "table" do
+ if widget.config.intersect then
+ if environment.Intersect(parent, widget.text) then
widget.hidden = true
- --widget.text:Hide()
- elseif widget.config.intersect and environment.Intersect and not environment.Intersect(GetMouseFocus(), widget.text) and widget.hidden then
+ widget.text:Hide()
+ elseif not environment.Intersect(parent, widget.text) and widget.hidden then
widget.hidden = false
widget.text:Show()
end