sets margin of history hearts to work only for left and right