Skip to content

Commit 9d8dd16

Browse files
author
zhaokai
committed
修改添加动画接口
1 parent 6821fcf commit 9d8dd16

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/service/PlotBase/Animation/TimeLine/TimeLine.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @Author: zk
44
* @Date: 2022-03-23 11:53:45
55
* @LastEditors: zk
6-
* @LastEditTime: 2022-06-16 17:38:44
6+
* @LastEditTime: 2022-06-17 15:46:41
77
*/
88

99
import { AnimationReg } from '../AnimationTypes';
@@ -202,11 +202,18 @@ export default class TimeLine {
202202
/**
203203
* @function: Module:TimeLine.prototype.addAnimationObject
204204
* @description: 添加动画对象
205+
* @param {*} plotObjects
205206
* @param {*} item
206207
* @return {*}
207208
*/
208-
addAnimationObject(item) {
209-
const addAnimation = this.createAnimationObject(item);
209+
addAnimationObject(plotObjects,item) {
210+
if(!plotObjects || plotObjects.length===0) return;
211+
const animationOptions= Object.assign({},item)
212+
const keyString= plotObjects.map((s)=>{
213+
return s.getElement().getFeatureId()
214+
}).toString()
215+
animationOptions.featureIds=keyString
216+
const addAnimation = this.createAnimationObject(animationOptions);
210217
this._animationArr.push(addAnimation);
211218
return addAnimation;
212219
}

src/service/PlotBase/SvgLoader/element/IrregularElement/Arrow/TailedSquadArrowGeometry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* @Author: your name
33
* @Date: 2021-11-09 10:38:10
4-
* @LastEditTime: 2022-06-13 15:23:17
4+
* @LastEditTime: 2022-06-17 15:42:37
55
* @LastEditors: zk
66
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
77
* @FilePath: \MapGISPlotBase\src\base\SvgLoader\element\IrregularElement\Arrow\SquadArrow.js

src/service/PlotUtilBase/Geometry/Arrow/Tailed_Squad_Arrow.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @Author: zk
55
* @Date: 2022-06-13 11:35:38
66
* @LastEditors: zk
7-
* @LastEditTime: 2022-06-13 15:24:01
7+
* @LastEditTime: 2022-06-17 15:51:43
88
*/
99
import { PlotUtils } from '../PoltUtils';
1010
import AttackArrow from './Attack_Arrow';
@@ -46,7 +46,6 @@ export default class TailedSquadArrow extends AttackArrow {
4646

4747
leftPnts = PlotUtils.getQBSplinePoints(leftPnts);
4848
rightPnts = PlotUtils.getQBSplinePoints(rightPnts);
49-
5049
return leftPnts.concat(headPnts, rightPnts.reverse(), [tailPnts[1], leftPnts[0]])
5150
}
5251

0 commit comments

Comments
 (0)