重构VisualMap和DataZoom

This commit is contained in:
monitor1394
2021-05-13 09:38:32 +08:00
parent a30c036245
commit 718e600279
12 changed files with 831 additions and 655 deletions

View File

@@ -163,5 +163,16 @@ namespace XCharts
ChartHelper.DestroyAllChildren(transform);
//SetAllComponentDirty();
}
public bool ScreenPointToChartPoint(Vector2 screenPoint, out Vector2 chartPoint)
{
var cam = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera;
if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(rectTransform,
screenPoint, cam, out chartPoint))
{
return false;
}
return true;
}
}
}