(property, value, start, startIsRelative, skipRecursion)
| 2550 | } |
| 2551 | |
| 2552 | resetTo(property, value, start, startIsRelative, skipRecursion) { |
| 2553 | _tickerActive || _ticker.wake(); |
| 2554 | this._ts || this.play(); |
| 2555 | let time = Math.min(this._dur, (this._dp._time - this._start) * this._ts), |
| 2556 | ratio; |
| 2557 | this._initted || _initTween(this, time); |
| 2558 | ratio = this._ease(time / this._dur); // don't just get tween.ratio because it may not have rendered yet. |
| 2559 | // possible future addition to allow an object with multiple values to update, like tween.resetTo({x: 100, y: 200}); At this point, it doesn't seem worth the added kb given the fact that most users will likely opt for the convenient gsap.quickTo() way of interacting with this method. |
| 2560 | // if (_isObject(property)) { // performance optimization |
| 2561 | // for (p in property) { |
| 2562 | // if (_updatePropTweens(this, p, property[p], value ? value[p] : null, start, ratio, time)) { |
| 2563 | // return this.resetTo(property, value, start, startIsRelative); // if a PropTween wasn't found for the property, it'll get forced with a re-initialization so we need to jump out and start over again. |
| 2564 | // } |
| 2565 | // } |
| 2566 | // } else { |
| 2567 | if (_updatePropTweens(this, property, value, start, startIsRelative, ratio, time, skipRecursion)) { |
| 2568 | return this.resetTo(property, value, start, startIsRelative, 1); // if a PropTween wasn't found for the property, it'll get forced with a re-initialization so we need to jump out and start over again. |
| 2569 | } |
| 2570 | //} |
| 2571 | _alignPlayhead(this, 0); |
| 2572 | this.parent || _addLinkedListItem(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0); |
| 2573 | return this.render(0); |
| 2574 | } |
| 2575 | |
| 2576 | kill(targets, vars = "all") { |
| 2577 | if (!targets && (!vars || vars === "all")) { |
no test coverage detected