Finish implementation of snapping edge for input ports