correct the source position relative to the target layer