mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 15:00:08 +00:00
修复Scatter动态添加数据时图表不及时刷新的问题
This commit is contained in:
@@ -34,13 +34,13 @@ namespace XCharts.Runtime
|
||||
SetValue(ref needInteract, value);
|
||||
}
|
||||
|
||||
public void SetValue(ref bool needInteract, float value)
|
||||
public void SetValue(ref bool needInteract, float value, bool previousValueZero = false)
|
||||
{
|
||||
if (m_TargetValue != value)
|
||||
{
|
||||
needInteract = true;
|
||||
if (!m_ValueEnable)
|
||||
m_PreviousValue = value;
|
||||
m_PreviousValue = previousValueZero ? 0 : value;
|
||||
else
|
||||
m_PreviousValue = m_CurrentValue;
|
||||
UpdateStart();
|
||||
@@ -52,19 +52,6 @@ namespace XCharts.Runtime
|
||||
}
|
||||
}
|
||||
|
||||
public void SetValue(float value)
|
||||
{
|
||||
if (m_TargetValue != value)
|
||||
{
|
||||
if (!m_ValueEnable)
|
||||
m_PreviousValue = value;
|
||||
else
|
||||
m_PreviousValue = m_CurrentValue;
|
||||
UpdateStart();
|
||||
m_TargetValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPosition(ref bool needInteract, Vector3 pos)
|
||||
{
|
||||
if (m_TargetPosition != pos)
|
||||
|
||||
Reference in New Issue
Block a user