from retail
This commit is contained in:
@@ -136,7 +136,7 @@ local funcs = {
|
||||
end
|
||||
end,
|
||||
UpdateVisible = function(self)
|
||||
local missingProgress = self.tick_placement_mode == "AtValue" and not self.trigger_total
|
||||
local missingProgress = self.tick_placement_mode ~= "AtPercent" and not self.trigger_total
|
||||
if self.tick_visible and not missingProgress then
|
||||
self:Show()
|
||||
else
|
||||
@@ -185,16 +185,15 @@ local funcs = {
|
||||
if self.tick_placement_mode == "AtValue" then
|
||||
local percent = self.trigger_total and self.trigger_total ~= 0 and self.tick_placement / self.trigger_total
|
||||
|
||||
if not self.trigger_total or percent < 0 or percent > 1 then
|
||||
if not self.trigger_total or percent and percent < 0 or percent > 1 then
|
||||
hide = true
|
||||
offset = 0
|
||||
else
|
||||
offset = percent * width
|
||||
end
|
||||
elseif self.tick_placement_mode == "AtMissingValue" then
|
||||
local percent = self.trigger_total and self.trigger_total ~= 0 and self.tick_placement / self.trigger_total
|
||||
percent = 1 - percent
|
||||
if not self.trigger_total or percent < 0 or percent > 1 then
|
||||
local percent = self.trigger_total and self.trigger_total ~= 0 and 1 - (self.tick_placement / self.trigger_total)
|
||||
if not self.trigger_total or percent and percent < 0 or percent > 1 then
|
||||
hide = true
|
||||
offset = 0
|
||||
else
|
||||
|
||||
@@ -48,7 +48,6 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
name = L["Tick Mode"],
|
||||
order = 3,
|
||||
values = WeakAuras.tick_placement_modes,
|
||||
desc = L["Relative mode positions the tick at the position relative to the total width of the progress bar.\nAbsolute mode positions the tick at a fixed value."],
|
||||
},
|
||||
tick_placement = {
|
||||
type = "input",
|
||||
|
||||
Reference in New Issue
Block a user