What is non-past verb + に?


> あの慌てようを見るに、危ない落ち方をしたのだろう。

The context is that the speaker fell over and hit his head, and his mom
screamed and ran over.

I think that it means something like "Seeing her panic, I guess it was a
dangerous kind of fall", but what on earth is the に? I can't find anything
about に attached to a verb except for には, but even if the は can be omitted,
the meaning doesn't seem to fit.

