3.0 - optimize code

This commit is contained in:
monitor1394
2022-03-04 22:17:32 +08:00
parent 1ee0df09eb
commit 5745fea9a1
59 changed files with 482 additions and 435 deletions

View File

@@ -23,7 +23,7 @@ namespace XCharts.Runtime
[NonSerialized] public SerieContext context = new SerieContext();
[NonSerialized] public InteractData interact = new InteractData();
internal SerieHandler handler { get; set; }
public SerieHandler handler { get; set; }
public virtual void SetVerticesDirty()
@@ -68,6 +68,19 @@ namespace XCharts.Runtime
handler.RemoveComponent();
}
public virtual void OnDataUpdate()
{
}
public virtual void OnBeforeSerialize()
{
}
public virtual void OnAfterDeserialize()
{
OnDataUpdate();
}
public void RefreshLabel()
{
if (handler != null)

View File

@@ -7,7 +7,7 @@ namespace XCharts.Runtime
[System.Serializable]
public class ChildComponent
{
public int index { get; set; }
public virtual int index { get; set; }
[NonSerialized] protected bool m_VertsDirty;
[NonSerialized] protected bool m_ComponentDirty;
[NonSerialized] protected Painter m_Painter;