MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / when

Method when

src/common/overlay/levelRenderer/Animation.js:405–428  ·  view source on GitHub ↗

* @function LevelRenderer.Animation.Animator.prototype.when * @description 设置动画关键帧 * @param {number} time - 关键帧时间,单位是ms * @param {Object} props - 关键帧的属性值,key-value表示 * @returns {LevelRenderer.Animation.Animator} Animator

(time /* ms */, props)

Source from the content-addressed store, hash-verified

403 * @returns {LevelRenderer.Animation.Animator} Animator
404 */
405 when(time /* ms */, props) {
406 for (var propName in props) {
407 if (!this._tracks[propName]) {
408 this._tracks[propName] = [];
409 // If time is 0
410 // Then props is given initialize value
411 // Else
412 // Initialize value from current prop value
413 if (time !== 0) {
414 this._tracks[propName].push({
415 time: 0,
416 value: Animation._cloneValue(
417 this._getter(this._target, propName)
418 )
419 });
420 }
421 }
422 this._tracks[propName].push({
423 time: parseInt(time, 10),
424 value: props[propName]
425 });
426 }
427 return this;
428 }
429
430
431 /**

Callers 15

AnimationSpec.jsFile · 0.80
VeFunction · 0.80
rvFunction · 0.80
diFunction · 0.80
TvFunction · 0.80
VeFunction · 0.80
rvFunction · 0.80
animateToShallowFunction · 0.80
loadingDefaultFunction · 0.80

Calls 2

pushMethod · 0.80
_cloneValueMethod · 0.80

Tested by

no test coverage detected