likeastore/ngDialog — pull request #33 by altmind (2014-06-04 13:10:16+00:00)
Title: When having animations, and closing one dialog more than once, subsequent opened dialogs close() dont remove class ngdialog-open from body, which breaks css overflow.

Take a case:

1) We open one dialog, then call close() on this dialog more than once(while animation of first call is still in transition).
2) We then open other dialog and close it once.
3) Observe: body is left with ngdialog-open css class which breaks "overflow".

caused by dialogsCount going negative and dialogsCount === 1 not firing.

PS: Its a question, if we should have condition dialogsCount === 1 in if, or dialogsCount <= 1. The later will prevent such cases, but won't contribute to fixing root cause problem.