Just walk the other way...far enough that once she does "calm down" or realize that there is no getting to them, you reward her for that. If she's good at obedience...start giving her obedience commands (sit, down, ect) to make her do things. If she doesn't do them...you correct for that. When you're correcting for her freak out...you're actually not correcting anything because you haven't taught her anything. All that will do is amp her up.
You should only correct when she does something she knows she's not supposed to do. So, you tell her sit, she doesn't...you correct. If you're just yanking on her collar and yelling "no" she has no idea what you're yelling about. In her mind, she doesn't connect the fact that her reaction is what's unwanted.
My dog used to do this...the goal is to figure out how far you have to get or what you have to do to finally get them to focus on something else.