mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 17:30:10 +00:00
重构Animation动画系统,增加Addition新增动画支持
This commit is contained in:
@@ -396,29 +396,19 @@ namespace XCharts.Runtime
|
||||
/// |开始所有Serie的渐入动画。
|
||||
/// </summary>
|
||||
/// <param name="reset">reset animation</param>
|
||||
public void AnimationFadein(bool reset = true)
|
||||
{
|
||||
if (reset) AnimationReset();
|
||||
foreach (var serie in m_Series) serie.AnimationFadein();
|
||||
}
|
||||
|
||||
[Obsolete("Use AnimationFadein() instead.", true)]
|
||||
public void AnimationFadeIn(bool reset = true)
|
||||
{
|
||||
if (reset) AnimationReset();
|
||||
foreach (var serie in m_Series) serie.AnimationFadeIn();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start all serie fadeout animations.
|
||||
/// |开始所有Serie的渐出动画。
|
||||
/// </summary>
|
||||
public void AnimationFadeout()
|
||||
{
|
||||
foreach (var serie in m_Series) serie.AnimationFadeout();
|
||||
}
|
||||
|
||||
[Obsolete("Use AnimationFadeout() instead.", true)]
|
||||
public void AnimationFadeOut()
|
||||
{
|
||||
foreach (var serie in m_Series) serie.AnimationFadeOut();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -649,7 +649,7 @@ namespace XCharts.Runtime
|
||||
serie.show = active;
|
||||
serie.RefreshLabel();
|
||||
serie.AnimationReset();
|
||||
if (active) serie.AnimationFadein();
|
||||
if (active) serie.AnimationFadeIn();
|
||||
UpdateLegendColor(serie.serieName, active);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace XCharts.Runtime
|
||||
InitComponentHandlers();
|
||||
InitSerieHandlers();
|
||||
AnimationReset();
|
||||
AnimationFadein();
|
||||
AnimationFadeIn();
|
||||
XChartsMgr.AddChart(this);
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ namespace XCharts.Runtime
|
||||
if (!m_CheckAnimation)
|
||||
{
|
||||
m_CheckAnimation = true;
|
||||
AnimationFadein();
|
||||
AnimationFadeIn();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -590,7 +590,7 @@ namespace XCharts.Runtime
|
||||
serie.context.dataIndexs.Clear();
|
||||
serie.context.dataIgnores.Clear();
|
||||
serie.animation.context.isAllItemAnimationEnd = true;
|
||||
if (serie.show && !serie.animation.HasFadeout())
|
||||
if (serie.show && !serie.animation.HasFadeOut())
|
||||
{
|
||||
if (!serie.context.pointerEnter)
|
||||
serie.ResetInteract();
|
||||
|
||||
Reference in New Issue
Block a user