Propagation of extragalactic photons at ultra-high energy with the EleCa code