Sign up (with export icon)

ui/bindings/csstransitiondisablermixin

Api-module icon module

Classes

Functions

  • Chevron-right icon

    A mixin that brings the possibility to temporarily disable CSS transitions using View methods. It is helpful when, for instance, the transitions should not happen when the view is first displayed but they should work normal in other cases.

    The methods to control the CSS transitions are:

    • disableCssTransitions() – Adds the .ck-transitions-disabled class to the view element.
    • enableCssTransitions() – Removes the .ck-transitions-disabled class from the view element.

    The usage comes down to:

    const MyViewWithCssTransitionDisabler = CssTransitionDisablerMixin( MyView );
    const view = new MyViewWithCssTransitionDisabler();
    
    // ...
    
    view.disableCssTransitions();
    view.show();
    view.enableCssTransitions();
    
    Copy code

    Type parameters

    Base : extends Constructor<View<HTMLElement>>

    Parameters

    view : Base

    View instance that should get this functionality.

    Returns

    Mixed<Base, ViewWithCssTransitionDisabler>