修复Editor下Serie的Data在多维数据下编辑异常的问题#62

This commit is contained in:
monitor1394
2020-06-11 07:32:01 +08:00
parent 7abaecb26a
commit e8bbd2f801
2 changed files with 3 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ namespace XCharts
SerializedProperty m_DataChangeEnable = prop.FindPropertyRelative("m_DataChangeEnable"); SerializedProperty m_DataChangeEnable = prop.FindPropertyRelative("m_DataChangeEnable");
SerializedProperty m_DataChangeDuration = prop.FindPropertyRelative("m_DataChangeDuration"); SerializedProperty m_DataChangeDuration = prop.FindPropertyRelative("m_DataChangeDuration");
SerializedProperty m_FadeInDelay = prop.FindPropertyRelative("m_FadeInDelay"); SerializedProperty m_FadeInDelay = prop.FindPropertyRelative("m_FadeInDelay");
SerializedProperty m_Threshold = prop.FindPropertyRelative("m_Threshold"); //SerializedProperty m_Threshold = prop.FindPropertyRelative("m_Threshold");
SerializedProperty m_ActualDuration = prop.FindPropertyRelative("m_ActualDuration"); SerializedProperty m_ActualDuration = prop.FindPropertyRelative("m_ActualDuration");
SerializedProperty m_FadeOutDelay = prop.FindPropertyRelative("m_FadeOutDelay"); SerializedProperty m_FadeOutDelay = prop.FindPropertyRelative("m_FadeOutDelay");
// SerializedProperty m_CurrDetailProgress = prop.FindPropertyRelative("m_CurrDetailProgress"); // SerializedProperty m_CurrDetailProgress = prop.FindPropertyRelative("m_CurrDetailProgress");

View File

@@ -449,7 +449,8 @@ namespace XCharts
var xWid = dataWid - 4; var xWid = dataWid - 4;
for (int i = 0; i < dimension; i++) for (int i = 0; i < dimension; i++)
{ {
while (i > data.arraySize - 1) var dataCount = i < 1 ? 2 : i + 1;
while (dataCount > data.arraySize)
{ {
data.InsertArrayElementAtIndex(data.arraySize); data.InsertArrayElementAtIndex(data.arraySize);
data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = 0; data.GetArrayElementAtIndex(data.arraySize - 1).floatValue = 0;