增加XChartsSettingseditorShowAllListData参数配置是否在Inspector中显示列表的所有数据

This commit is contained in:
monitor1394
2021-01-19 23:18:41 +08:00
parent 68da7221b8
commit fb549bd0c7
5 changed files with 9 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
# 更新日志 # 更新日志
* (2021.01.19) Add `XChartsSettings` `editorShowAllListData` parameter to configure whether to display all the list's data in Inspector
* (2021.01.19) Release `v2.0.0-preview.1` version * (2021.01.19) Release `v2.0.0-preview.1` version
* (2021.01.02) Release `v1.6.3` version * (2021.01.02) Release `v1.6.3` version
* (2020.12.18) fixed an issue where updating data when `Animation` was not enabled caused the chart to keep refreshing * (2020.12.18) fixed an issue where updating data when `Animation` was not enabled caused the chart to keep refreshing

View File

@@ -1,6 +1,7 @@
# 更新日志 # 更新日志
* (2021.01.19) 增加`XChartsSettings``editorShowAllListData`参数配置是否在`Inspector`中显示列表的所有数据
* (2021.01.19) 发布`v2.0.0-preview.1`版本 * (2021.01.19) 发布`v2.0.0-preview.1`版本
* (2021.01.02) 发布`v1.6.3`版本 * (2021.01.02) 发布`v1.6.3`版本
* (2020.12.18) 修复`Animation`不启用时更新数据会导致图表一直刷新的问题 * (2020.12.18) 修复`Animation`不启用时更新数据会导致图表一直刷新的问题

View File

@@ -427,7 +427,7 @@ namespace XCharts
while (listSize > m_Datas.arraySize) m_Datas.arraySize++; while (listSize > m_Datas.arraySize) m_Datas.arraySize++;
while (listSize < m_Datas.arraySize) m_Datas.arraySize--; while (listSize < m_Datas.arraySize) m_Datas.arraySize--;
} }
if (listSize > 30) if (listSize > 30 && !XChartsSettings.editorShowAllListData)
{ {
int num = listSize > 10 ? 10 : listSize; int num = listSize > 10 ? 10 : listSize;
for (int i = 0; i < num; i++) for (int i = 0; i < num; i++)

View File

@@ -328,7 +328,7 @@ public class ChartEditorHelper
while (listSize < listProp.arraySize) listProp.arraySize--; while (listSize < listProp.arraySize) listProp.arraySize--;
} }
} }
if (listSize > 30) if (listSize > 30 && !XChartsSettings.editorShowAllListData)
{ {
SerializedProperty element; SerializedProperty element;
int num = listSize > 10 ? 10 : listSize; int num = listSize > 10 ? 10 : listSize;

View File

@@ -49,6 +49,7 @@ namespace XCharts
[SerializeField] [Range(0, 200)] private float m_SerieScatterSymbolSelectedSize = 30f; [SerializeField] [Range(0, 200)] private float m_SerieScatterSymbolSelectedSize = 30f;
[SerializeField] private bool m_EditorBlockEnable = true; [SerializeField] private bool m_EditorBlockEnable = true;
[SerializeField] private bool m_EditorShowAllListData = false;
[SerializeField] [Range(1, 20)] protected int m_MaxPainter = 10; [SerializeField] [Range(1, 20)] protected int m_MaxPainter = 10;
[SerializeField] [Range(1, 10)] protected float m_LineSmoothStyle = 3f; [SerializeField] [Range(1, 10)] protected float m_LineSmoothStyle = 3f;
@@ -97,6 +98,7 @@ namespace XCharts
#region editor #region editor
public static bool editorBlockEnable { get { return Instance.m_EditorBlockEnable; } } public static bool editorBlockEnable { get { return Instance.m_EditorBlockEnable; } }
public static bool editorShowAllListData { get { return Instance.m_EditorShowAllListData; } }
#endregion #endregion
#region graphic #region graphic