优化Comment的位置,用Location代替Position

This commit is contained in:
monitor1394
2022-11-27 17:28:37 +08:00
parent 906b6ed4c7
commit f2001fbc82
5 changed files with 30 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ namespace XCharts.Runtime
/// </summary>
[Serializable]
[ComponentHandler(typeof(CommentHander), true)]
public class Comment : MainComponent
public class Comment : MainComponent, IPropertyChanged
{
[SerializeField] private bool m_Show = true;
[SerializeField] private LabelStyle m_LabelStyle = new LabelStyle();
@@ -65,5 +65,17 @@ namespace XCharts.Runtime
}
return m_MarkStyle;
}
/// <summary>
/// Callback handling when parameters change.
/// |参数变更时的回调处理。
/// </summary>
public void OnChanged()
{
foreach (var item in items)
{
item.location.OnChanged();
}
}
}
}