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 3
3
* @Author : zk
4
4
* @Date : 2022-03-23 11:53:45
5
5
* @LastEditors : zk
6
- * @LastEditTime : 2022-07-07 11:50:08
6
+ * @LastEditTime : 2022-07-08 17:38:44
7
7
*/
8
8
import { Zondy } from '../../../common' ;
9
9
import { AnimationReg } from '../AnimationTypes' ;
10
+ import { createGuid } from '../../../PlotUtilBase/Util/Guid' ;
10
11
export default class TimeLine {
11
12
constructor ( layerGroup , options ) {
12
13
this . _layerGroup = layerGroup ;
@@ -170,7 +171,8 @@ export default class TimeLine {
170
171
const animationOptions = this . _animationArr . map ( ( ani ) => ani . exportOption ( ) ) ;
171
172
const t = {
172
173
timeLineName : this . _timeLineName ,
173
- animations : animationOptions
174
+ animations : animationOptions ,
175
+ id :this . _scriptId
174
176
} ;
175
177
return t ;
176
178
}
@@ -183,6 +185,7 @@ export default class TimeLine {
183
185
fromJSON ( json ) {
184
186
if ( ! json || ! json . animations ) return ;
185
187
this . _timeLineName = json . timeLineName ;
188
+ this . _scriptId = json . id || createGuid ( )
186
189
this . _animationArr = json . animations . map ( ( s ) => {
187
190
return this . createAnimationObject ( s ) ;
188
191
} ) ;
You can’t perform that action at this time.
0 commit comments