code: function dialogPopOut(container, options) {
        return options.reverseAnimate().then(function() {
          if (options.contentElement) {
            // When we use a contentElement, we want the element to be the same as before.
            // That means, that we have to clear all the animation properties, like transform.
            options.clearAnimate();
          }
        });
      }
docs: Dialog close and pop-out animation