Skip to content

Commit

Permalink
完善对多屏幕的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1394 committed Jun 13, 2021
1 parent 1f676c4 commit 953bea6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Assets/XCharts/CHANGELOG-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions Assets/XCharts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

## master

* (2021.06.13) 完善对多屏幕的支持
* (2021.06.12) 增加`IconStyle``align`参数设置图标的水平对齐
* (2021.06.12) 优化主题`Theme`的导入和字体自动刷新 (#148)
* (2021.06.10) 修复`Unity`版本兼容问题 (#154)
Expand Down
3 changes: 3 additions & 0 deletions Assets/XCharts/Runtime/API/BaseGraph_API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ public void RemoveChartObject()

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

0 comments on commit 953bea6

Please sign in to comment.