mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-28 03:58:49 +00:00
增加自由锚点支持,任意对齐方式
This commit is contained in:
@@ -282,12 +282,12 @@ namespace XCharts
|
||||
return 0;
|
||||
}
|
||||
|
||||
internal void UpdateRadarCenter(float chartWidth, float chartHeight)
|
||||
internal void UpdateRadarCenter(Vector3 chartPosition, float chartWidth, float chartHeight)
|
||||
{
|
||||
if (center.Length < 2) return;
|
||||
var centerX = center[0] <= 1 ? chartWidth * center[0] : center[0];
|
||||
var centerY = center[1] <= 1 ? chartHeight * center[1] : center[1];
|
||||
runtimeCenterPos = new Vector2(centerX, centerY);
|
||||
runtimeCenterPos = chartPosition + new Vector3(centerX, centerY);
|
||||
if (radius <= 0)
|
||||
{
|
||||
runtimeRadius = 0;
|
||||
|
||||
Reference in New Issue
Block a user