From 1c8cdd3286532adc3a870b38548f3c11944fc58f Mon Sep 17 00:00:00 2001 From: Alexander Gugel Date: Thu, 20 Aug 2015 11:53:16 +0200 Subject: [PATCH] fix: Properly update position in callback function Resolves #474 Example: var position = new Position(parent0); position.set(100, 100, 100, { duration: 500, curve: 'inOutExpo' }, function () { position.set(0, 0, 0); }); --- components/Position.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Position.js b/components/Position.js index 01cc7796..63f48052 100644 --- a/components/Position.js +++ b/components/Position.js @@ -158,8 +158,8 @@ Position.prototype._checkUpdate = function _checkUpdate() { * @return {undefined} undefined */ Position.prototype.update = function update () { - this._node.setPosition(this._x.get(), this._y.get(), this._z.get()); this._checkUpdate(); + this._node.setPosition(this._x.get(), this._y.get(), this._z.get()); }; Position.prototype.onUpdate = Position.prototype.update;