Skip to content

Commit

Permalink
Retrieve tweeningValue from onUpdate callback in documentation (#1350)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Boydbueno authored and chrisvfritz committed Jan 5, 2018
1 parent 7fa317a commit 9163da0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/v2/guide/transitioning-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ Vue.component('animated-integer', {

new TWEEN.Tween({ tweeningValue: startValue })
.to({ tweeningValue: endValue }, 500)
.onUpdate(function () {
vm.tweeningValue = this.tweeningValue.toFixed(0)
.onUpdate(function (object) {
vm.tweeningValue = object.tweeningValue.toFixed(0)
})
.start()

Expand Down

0 comments on commit 9163da0

Please sign in to comment.