File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/service/PlotBase/Animation/TimeLine Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 33 * @Author : zk
44 * @Date : 2022-03-23 11:53:45
55 * @LastEditors : zk
6- * @LastEditTime : 2022-07-07 11:50:08
6+ * @LastEditTime : 2022-07-08 17:38:44
77 */
88import { Zondy } from '../../../common' ;
99import { AnimationReg } from '../AnimationTypes' ;
10+ import { createGuid } from '../../../PlotUtilBase/Util/Guid' ;
1011export default class TimeLine {
1112 constructor ( layerGroup , options ) {
1213 this . _layerGroup = layerGroup ;
@@ -170,7 +171,8 @@ export default class TimeLine {
170171 const animationOptions = this . _animationArr . map ( ( ani ) => ani . exportOption ( ) ) ;
171172 const t = {
172173 timeLineName : this . _timeLineName ,
173- animations : animationOptions
174+ animations : animationOptions ,
175+ id :this . _scriptId
174176 } ;
175177 return t ;
176178 }
@@ -183,6 +185,7 @@ export default class TimeLine {
183185 fromJSON ( json ) {
184186 if ( ! json || ! json . animations ) return ;
185187 this . _timeLineName = json . timeLineName ;
188+ this . _scriptId = json . id || createGuid ( )
186189 this . _animationArr = json . animations . map ( ( s ) => {
187190 return this . createAnimationObject ( s ) ;
188191 } ) ;
You can’t perform that action at this time.
0 commit comments