mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 15:00:08 +00:00
修复Line设置Animation为AlongPath时动画异常的问题 (#281)
This commit is contained in:
@@ -304,12 +304,6 @@ namespace XCharts.Runtime
|
||||
}
|
||||
var sp = paths[startIndex];
|
||||
var ep = paths[paths.Count - 1];
|
||||
if (sp == anim.context.currPoint && ep == anim.context.destPoint)
|
||||
{
|
||||
return;
|
||||
}
|
||||
anim.context.currPoint = sp;
|
||||
anim.context.destPoint = ep;
|
||||
var currDetailProgress = isY ? sp.y : sp.x;
|
||||
var totalDetailProgress = isY ? ep.y : ep.x;
|
||||
if (context.type == AnimationType.AlongPath)
|
||||
@@ -328,6 +322,12 @@ namespace XCharts.Runtime
|
||||
m_LinePathLastPos = sp;
|
||||
context.currentPathDistance = 0;
|
||||
}
|
||||
if (sp == anim.context.currPoint && ep == anim.context.destPoint)
|
||||
{
|
||||
return;
|
||||
}
|
||||
anim.context.currPoint = sp;
|
||||
anim.context.destPoint = ep;
|
||||
anim.Init(currDetailProgress, totalDetailProgress, paths.Count - 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user