完善对多屏幕的支持

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

@@ -35,6 +35,7 @@
## master
* (2021.06.13) Improved support for multiple screens
* (2021.06.12) Add `iconStyle` `align` parameter to set the horizontal alignment of the icon
* (2021.06.12) Optimized import of `Theme` and automatic font refresh (#148)
* (2021.06.10) Fixed compatibility issues with `Unity` version (#154)

View File

@@ -35,6 +35,7 @@
## master
* (2021.06.13) 完善对多屏幕的支持
* (2021.06.12) 增加`IconStyle``align`参数设置图标的水平对齐
* (2021.06.12) 优化主题`Theme`的导入和字体自动刷新 (#148)
* (2021.06.10) 修复`Unity`版本兼容问题 (#154)

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))