Turned out that NotifyChange will have no effect when called from within a setter since
setting a value already leads to a GUI refresh automatically. The thing is that min and max
is only initialized once at creation. Currently there is no way to add a function here. So I need
to set the min max values manually:
Lua Code:
anchor = {
type = "select",
order = 1,
name = LOCALE["ANCHOR"],
desc = LOCALE["ANCHOR_MINI_MAP"],
values = CORE.Values.Anchors,
get = function()
return LybrialMiniMap.db.profile.position.anchor;
end,
set = function(_, value)
LybrialMiniMap.db.profile.position.anchor = value;
LybrialMiniMap:OnUpdatePosition();
LybrialUI.options.args.miniMap.args.position.args.offset.args.x.min = Minimap:GetMinOffsetX(value);
LybrialUI.options.args.miniMap.args.position.args.offset.args.x.max = Minimap:GetMaxOffsetX(value);
end,
},