Move setPosition() and setPositionDirectly() for curves as generic method to element.js