拼ui 一些业务逻辑x实现

This commit is contained in:
FloatGaming
2026-03-19 06:15:09 +08:00
parent f5c6f143c0
commit 49e45ac464
1118 changed files with 246518 additions and 5368 deletions
@@ -0,0 +1,46 @@
using UnityEngine.UIElements;
namespace EasyChart
{
internal sealed class ChartPointerInteractionModule : IChartModule, IChartPointerModule
{
private ChartElement _owner;
public void Bind(ChartElement owner, ChartKernel kernel)
{
_owner = owner;
}
public void Unbind()
{
_owner = null;
}
public void OnPointerMove(PointerMoveEvent evt)
{
if (_owner == null) return;
var p = _owner.InteractionPolicy ?? DefaultChartInteractionPolicy.Instance;
p.OnPointerMove(
_owner.TooltipControllerInternal,
_owner,
evt.position,
_owner.Data,
_owner.RenderersInternal,
_owner.ChartAreaInternal,
_owner.PaddingInternal,
_owner.IsCartesianTransposedInternal,
_owner.IsCategorySmoothTranslatingInternal,
_owner.TooltipLabelInternal,
_owner.CursorLineInternal);
}
public void OnPointerLeave(PointerLeaveEvent evt)
{
if (_owner == null) return;
var p = _owner.InteractionPolicy ?? DefaultChartInteractionPolicy.Instance;
p.OnPointerLeave(_owner.TooltipControllerInternal, _owner.RenderersInternal, _owner.TooltipLabelInternal, _owner.CursorLineInternal);
}
}
}