Improve logic for Y.DOM.setXY