From 1215508626c1fa7598d5e5a53c696dbc1cd6103b Mon Sep 17 00:00:00 2001 From: Boyd Bueno de Mesquita Date: Fri, 5 Jan 2018 20:12:50 +0100 Subject: [PATCH] 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. --- src/v2/guide/transitioning-state.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v2/guide/transitioning-state.md b/src/v2/guide/transitioning-state.md index b78e8237c..7d00c82ec 100644 --- a/src/v2/guide/transitioning-state.md +++ b/src/v2/guide/transitioning-state.md @@ -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()