private void addInitialAnimationHandler(WorkbenchOverlay workbenchOverlay, Side side) {
        Region overlay = workbenchOverlay.getOverlay();
        // prepare values for setting the listener
        ReadOnlyDoubleProperty size =
                side.isVertical() ? overlay.widthProperty() : overlay.heightProperty();
        //                       LEFT or RIGHT side          TOP or BOTTOM side

        // make sure this code only gets run the first time the overlay has been shown and
        // rendered in the scene graph, to ensure the overlay has a size for the calculations
        workbenchOverlay.setOnInitialized(event -> {
            // prepare variables
            TranslateTransition start = workbenchOverlay.getAnimationStart();
            TranslateTransition end = workbenchOverlay.getAnimationEnd();
            DoubleExpression hiddenCoordinate = DoubleBinding.doubleExpression(size);
            if (Side.LEFT.equals(side) || Side.TOP.equals(side)) {
                hiddenCoordinate = hiddenCoordinate.negate(); // make coordinates in hidden state negative
            }

            if (side.isVertical()) { // LEFT or RIGHT => X
                overlay.setTranslateX(hiddenCoordinate.get()); // initial position
                start.setToX(0);
                if (!end.toXProperty().isBound()) {
                    end.toXProperty().bind(hiddenCoordinate);
                }
            }
            if (side.isHorizontal()) { // TOP or BOTTOM => Y
                overlay.setTranslateY(hiddenCoordinate.get()); // initial position
                start.setToY(0);
                if (!end.toYProperty().isBound()) {
                    end.toYProperty().bind(hiddenCoordinate);
                }
            }

            start.play();
        });
    }
Handles the initial animation of an overlay.

<p>An overlay will have a default size of {@code 0}, when it is <b>first being shown</b> by
{@link WorkbenchPresenter#showOverlay(Region, boolean)}, because it has not been added to the
scene graph or a layout pass has not been performed yet. This means the animation won't be
played by {@link WorkbenchPresenter#showOverlay(Region, boolean)} as well.<br>
For this reason, we wait for the {@link WorkbenchOverlay} to be initialized and then initially
set the coordinates of the overlay to be outside of the {@link Scene}, followed by playing the
initial starting animation.<br>
Any subsequent calls which show this {@code workbenchOverlay} again will <b>not</b> cause this
to trigger again, as the {@link Event} of {@link WorkbenchOverlay#onInitializedProperty()}
will only be fired once, since calling {@link Workbench#hideOverlay(Region)} only makes the
overlays not visible, which means the nodes remain with their size already initialized in the
scene graph.

@param workbenchOverlay for which to prepare the initial animation handler for
@param side             from which the sliding animation should originate
workbenchfx-core/src/main/java/com/dlsc/workbenchfx/Workbench.java