From 9163da0880122c5e06513ea32fdc8ef5521c73b5 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 2b1fb91925..8f32acfb01 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()