mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 15:30:09 +00:00
优化Background组件的生效条件,需要有单独的父节点
This commit is contained in:
@@ -14,9 +14,9 @@ namespace XCharts
|
||||
{
|
||||
/// <summary>
|
||||
/// 背景组件。
|
||||
/// 由于框架的局限性,背景组件在chart受上层布局控制时不适用。因为背景组件节点和chart节点是同一级的。
|
||||
/// 自动布局下的一种解决方案是,可以将chart节点再包一层parent。
|
||||
/// 要处理这个问题底层框架要大改了,目前暂时不打算改。
|
||||
/// 由于框架的局限性,背景组件使用有以下两个限制:
|
||||
/// 1:chart的父节点不能有布局控制类组件。
|
||||
/// 2:chart的父节点只能有当前chart一个子节点。
|
||||
/// 背景组件的开启需要通过接口来开启:BaseChart.EnableBackground(bool flag)
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
@@ -33,7 +33,7 @@ namespace XCharts
|
||||
[SerializeField] private bool m_HideThemeBackgroundColor = true;
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用背景组件。注意背景组件在chart受上层布局控制时不适用。
|
||||
/// 是否启用背景组件。但能否激活背景组件还要受其他条件限制。
|
||||
/// </summary>
|
||||
public bool show
|
||||
{
|
||||
@@ -112,6 +112,11 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_HideThemeBackgroundColor, value)) SetVerticesDirty(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否已激活
|
||||
/// </summary>
|
||||
public bool runtimeActive{get;internal set;}
|
||||
|
||||
public static Background defaultBackground
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user