Skip to content

Commit d1cb0d1

Browse files
BoydbuenoJinjiang
authored andcommitted
Retrieve tweeningValue from onUpdate callback in documentation (#1350)
The tweeningValue no longer seems to be available in the tween object itself. Instead, the tweeningValue is available in the tweened object that passed as a parameter to the onUpdate callback.
1 parent 8e98f4b commit d1cb0d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v2/guide/transitioning-state.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ Vue.component('animated-integer', {
446446

447447
new TWEEN.Tween({ tweeningValue: startValue })
448448
.to({ tweeningValue: endValue }, 500)
449-
.onUpdate(function () {
450-
vm.tweeningValue = this.tweeningValue.toFixed(0)
449+
.onUpdate(function (object) {
450+
vm.tweeningValue = object.tweeningValue.toFixed(0)
451451
})
452452
.start()
453453

0 commit comments

Comments
 (0)