完善对多屏幕的支持

This commit is contained in:
monitor1394
2021-06-13 11:50:41 +08:00
parent 25e8dd1d09
commit 793c9dee46
3 changed files with 5 additions and 0 deletions

View File

@@ -166,6 +166,9 @@ namespace XCharts
public bool ScreenPointToChartPoint(Vector2 screenPoint, out Vector2 chartPoint)
{
#if ! UNITY_EDITOR
screenPoint = Display.RelativeMouseAt(screenPoint);
#endif
var cam = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera;
if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(rectTransform,
screenPoint, cam, out chartPoint))