@progress/kendo-angular-dialog
Version:
Dialog Package for Angular
20 lines (19 loc) • 1.03 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { animations } from "./animations";
import { createPlayer } from "./create-animation-player";
/**
* @hidden
*/
export const animateContent = (animation, defAnimationConfig, animatedElement, builder) => {
let animationConfig = defAnimationConfig;
if (typeof animation !== 'boolean') {
animationConfig = animation;
animationConfig.duration = animationConfig.duration ? animationConfig.duration : defAnimationConfig.duration;
}
const animationSpecs = animations(animationConfig.duration, animationConfig.direction, animationConfig.type);
const player = createPlayer(builder, animationSpecs, animatedElement);
player.play();
};