From 4c64fe9d52ada2782dc4022dfc56c4f6ff7f4367 Mon Sep 17 00:00:00 2001 From: tomasklaen Date: Mon, 6 May 2024 10:12:57 +0200 Subject: [PATCH] fix: flash out animations always starting from max instead of current visibility value closes #900 --- src/uosc/elements/Element.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uosc/elements/Element.lua b/src/uosc/elements/Element.lua index 733d63ee..b3e81e0c 100644 --- a/src/uosc/elements/Element.lua +++ b/src/uosc/elements/Element.lua @@ -35,7 +35,7 @@ function Element:init(id, props) local function getTo() return self.proximity end local function onTweenEnd() self.forced_visibility = nil end if self.enabled then - self:tween_property('forced_visibility', 1, getTo, onTweenEnd) + self:tween_property('forced_visibility', self:get_visibility(), getTo, onTweenEnd) else onTweenEnd() end