mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 05:10:12 +00:00
增加Axis的splitLine参数控制分割线
This commit is contained in:
@@ -200,6 +200,20 @@ namespace XCharts
|
||||
{
|
||||
CheckMinMaxValue();
|
||||
}
|
||||
|
||||
public Vector3 ClampInCoordinate(Vector3 pos)
|
||||
{
|
||||
if (IsInCooridate(pos)) return pos;
|
||||
else
|
||||
{
|
||||
var np = new Vector3(pos.x, pos.y);
|
||||
if (np.x < coordinateX) np.x = coordinateX;
|
||||
if (np.x > coordinateX + coordinateWidth) np.x = coordinateX + coordinateWidth;
|
||||
if (np.y < coordinateY) np.y = coordinateY;
|
||||
if (np.y > coordinateY + coordinateHeight) np.y = coordinateY + coordinateHeight;
|
||||
return np;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user