mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-30 05:08:48 +00:00
修复Line设置Animation为AlongPath时动画异常的问题 (#281)
This commit is contained in:
@@ -69,6 +69,7 @@ slug: /changelog
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2023.10.15) 修复`Line`设置`Animation`为`AlongPath`时动画异常的问题 (#281)
|
||||||
* (2023.10.12) 修复`MarkLine`指定`yValue`时对数值轴无效的问题
|
* (2023.10.12) 修复`MarkLine`指定`yValue`时对数值轴无效的问题
|
||||||
* (2023.10.11) 修复`Serie`的`showDataDimension`设置无效的问题
|
* (2023.10.11) 修复`Serie`的`showDataDimension`设置无效的问题
|
||||||
|
|
||||||
|
|||||||
@@ -304,12 +304,6 @@ namespace XCharts.Runtime
|
|||||||
}
|
}
|
||||||
var sp = paths[startIndex];
|
var sp = paths[startIndex];
|
||||||
var ep = paths[paths.Count - 1];
|
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 currDetailProgress = isY ? sp.y : sp.x;
|
||||||
var totalDetailProgress = isY ? ep.y : ep.x;
|
var totalDetailProgress = isY ? ep.y : ep.x;
|
||||||
if (context.type == AnimationType.AlongPath)
|
if (context.type == AnimationType.AlongPath)
|
||||||
@@ -328,6 +322,12 @@ namespace XCharts.Runtime
|
|||||||
m_LinePathLastPos = sp;
|
m_LinePathLastPos = sp;
|
||||||
context.currentPathDistance = 0;
|
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);
|
anim.Init(currDetailProgress, totalDetailProgress, paths.Count - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user