mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 09:50:15 +00:00
修复TriggerTooltip()接口在指定0或最大index时可能无法触发的问题
This commit is contained in:
@@ -203,7 +203,7 @@ namespace XCharts.Runtime
|
||||
[Since("v3.7.0")]
|
||||
public bool ContainsX(float x)
|
||||
{
|
||||
return x >= context.x && x <= context.x + context.width;
|
||||
return x >= context.x - 0.01f && x <= context.x + context.width + 0.01f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -215,7 +215,7 @@ namespace XCharts.Runtime
|
||||
[Since("v3.7.0")]
|
||||
public bool ContainsY(float y)
|
||||
{
|
||||
return y >= context.y && y <= context.y + context.height;
|
||||
return y >= context.y - 0.01f && y <= context.y + context.height + 0.01f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -733,6 +733,7 @@ namespace XCharts.Runtime
|
||||
[Since("v3.7.0")]
|
||||
public void CancelTooltip()
|
||||
{
|
||||
m_PointerEventData = null;
|
||||
var tooltip = GetChartComponent<Tooltip>();
|
||||
if (tooltip != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user