[feature][datazoom] 增加DataZoomMarqueeStyle支持框选区域

This commit is contained in:
monitor1394
2022-11-12 21:32:08 +08:00
parent 5e234dc408
commit 8c0eb970d3
3 changed files with 13 additions and 12 deletions

View File

@@ -65,7 +65,7 @@ namespace XCharts.Runtime
[SerializeField] private bool m_SupportInsideScroll = true;
[SerializeField] private bool m_SupportInsideDrag = true;
[SerializeField] private bool m_SupportSlider;
[SerializeField] private bool m_SupportSelect;
[SerializeField] private bool m_SupportMarquee;
[SerializeField] private bool m_ShowDataShadow;
[SerializeField] private bool m_ShowDetail;
[SerializeField] private bool m_ZoomLock;
@@ -169,12 +169,13 @@ namespace XCharts.Runtime
set { if (PropertyUtil.SetStruct(ref m_SupportSlider, value)) SetVerticesDirty(); }
}
/// <summary>
/// 是否支持框选。提供一个选框进行数据区域缩放。
/// Supported Box Selected. Provides a marquee for scaling the data area.
/// |是否支持框选。提供一个选框进行数据区域缩放。
/// </summary>
public bool supportSelect
public bool supportMarquee
{
get { return m_SupportSelect; }
set { if (PropertyUtil.SetStruct(ref m_SupportSelect, value)) SetVerticesDirty(); }
get { return m_SupportMarquee; }
set { if (PropertyUtil.SetStruct(ref m_SupportMarquee, value)) SetVerticesDirty(); }
}
/// <summary>
/// Whether to show data shadow, to indicate the data tendency in brief.
@@ -534,7 +535,7 @@ namespace XCharts.Runtime
public bool IsInMarqueeArea(Vector2 pos)
{
if (!supportSelect) return false;
if (!supportMarquee) return false;
return context.marqueeRect.Contains(pos);
}