解决海图索引超过2000头像不显示问题
This commit is contained in:
parent
70a8bc0000
commit
a2ff7604cc
@ -565,6 +565,23 @@ namespace ChartAndGraph
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int GetViewIndex(int dataIndex,string category)
|
||||||
|
{
|
||||||
|
CategoryData data = (CategoryData)mData[category];
|
||||||
|
int viewIndex = 0;
|
||||||
|
List<DoubleVector3> points = data.getPoints();
|
||||||
|
if (points.Count == 0)
|
||||||
|
viewIndex = 0;
|
||||||
|
if (dataIndex < 0)
|
||||||
|
viewIndex = 0;
|
||||||
|
for (int i = 0; i < points.Count; i++)
|
||||||
|
{
|
||||||
|
if (points[i].x == dataIndex)
|
||||||
|
viewIndex = i;
|
||||||
|
}
|
||||||
|
return viewIndex;
|
||||||
|
}
|
||||||
|
|
||||||
public DoubleVector3 GetPoint(string category, int index)
|
public DoubleVector3 GetPoint(string category, int index)
|
||||||
{
|
{
|
||||||
CategoryData data = (CategoryData)mData[category];
|
CategoryData data = (CategoryData)mData[category];
|
||||||
|
|||||||
@ -159,14 +159,17 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
}
|
}
|
||||||
public int GetViewIndex(int index)
|
public int GetViewIndex(int index)
|
||||||
{
|
{
|
||||||
foreach (var item in pointMap)
|
if (graph == null)
|
||||||
{
|
return index;
|
||||||
if (item.Key.Contains(index))
|
return graph.DataSource.GetViewIndex(index, Category);
|
||||||
{
|
//foreach (var item in pointMap)
|
||||||
return item.Value;
|
//{
|
||||||
}
|
// if (item.Key.Contains(index))
|
||||||
}
|
// {
|
||||||
return index;
|
// return item.Value;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IDictionary<IList<int>, int> pointMap = new Dictionary<IList<int>, int>();
|
private IDictionary<IList<int>, int> pointMap = new Dictionary<IList<int>, int>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user