mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-15 04:20:09 +00:00
重构VisualMap和DataZoom
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user