I can't see your image, but I guess you want something like:
ClearAll[func]
func[{ri_,rj_},___]:=If[FreeQ[ri-rj,0.], Line[{ri,{rj[[1]],ri[[2]]},rj}],Line[{ri,rj}]]
TreePlot[{1->4,1->6,1->8,2->6,3->8,4->5,7->8},Top,VertexLabeling->True,EdgeRenderingFunction->func]
