Skip to content

Commit d835e7b

Browse files
vuejs-jp-botkazupon
authored andcommitted
Retrieve tweeningValue from onUpdate callback in documentation (#1350) (#599)
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 c5c8fc8 commit d835e7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v2/guide/transitioning-state.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ Vue.component('animated-integer', {
445445

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

0 commit comments

Comments
 (0)