[verb ない-form 〜ない → 〜] + んばかりに [verb ない-form 〜ない → 〜] + んばかりの + [noun] [verb ない-form 〜ない → 〜] + んばかりだ する → せんばかりに
んばかりに says that something looked about to happen, to show how strong a feeling or a movement was: "as if to", "all but". It takes the verb's ない-form with ない dropped, so 言わない gives いわ言わんばかりに and 泣かない gives なか泣かんばかりに; する becomes せんばかりに.
The thing after ん does not happen. She did not cry and the tail stayed on; the pattern says how close it looked.
The pattern is written and narrative. In conversation you say いまに今にもなき泣きそうに or なき泣きそうなかお顔で.
The stem is the one ない attaches to, but this ん is an old ending meaning "would", not the negative ん of しら知らん. 泣かんばかりに is "as if about to cry", never "as if not crying". The dictionary form does not go in front of it.
Before a noun the form is んばかりの, and at the end of a sentence it is んばかりだ.
After a quotation, と言わんばかりに and とばかりに mean the same: someone acts as if saying the words.