akserg/angular.dart.ui — pull request #109 by just95 (2014-10-09 19:52:15+00:00)
Title: Fixed modal animation

Issue #107 describes that the background of modals is not animated (which can be fixed by applying the changes of #108).
The gif included in that report also illustrates that the animation of the modal window itself is not working.
The problem is that .modal is only visible if the .in class is set and only animated if the .fade class is set before .in is added.
.in is currently added when ModalWindow.animate is set to true which will be done by ModalWindow.attach almost immediately after the component is created.
Thus the .in class is always set and no animation can occur. The actions of ModalWindow.attach therefore have to be deferred by a few milliseconds.
However, this does still not entirely solve the issue as ModalOptions.animate has to be actively set to false by the user. Otherwise .in would be set right away again such that no animation can occur.
This is why I think that the name ModalOptions.animate is misleading and propose to rename it to ModalOptions.preventAnimation. In this case the default value should be false.
The animate attribute of the modal-window component should be renamed accordingly but not ModalWindow.animate which should be called ModalWindow.visible to make the intention behind overwriting its value in ModalWindow.attach clear and to make the relation to .in more obvious.
I do not expect these changes to break existing code because animations did not work anyway.