cocos2d/cocos2d-html5 — pull request #855 by smshuja (2013-03-28 04:55:11+00:00)
Title: Fixed Parallax position issue when adding a child

This code originally updated the ParllaxNode position while adding a child

var pos = this._position;
pos.x = pos.x * ratio.x + offset.x;
pos.y = pos.y * ratio.y + offset.y;
child.setPosition(pos);

Because Javascript always passes objects by reference, any modifications on pos updates the ParallaxNode position as well.

It should be

var pos = cc.p(this._position.x, this._position.y);