Animation Effects

The Window enables you to change its interactivity by setting animation effects.

<div id="vueapp" class="vue-app">
    <h4>Animation Settings</h4>
    <ul class="options">
        <li>
            <input ref="default" name="animation" type="radio" checked="checked" @change="onChange" /> <label for="default">default/zoom animation</label>
        </li>
        <li>
            <input ref="toggle" name="animation" type="radio" @change="onChange" /> <label for="toggle">toggle animation</label>
        </li>
        <li>
            <input ref="expand" name="animation" type="radio" checked="checked" @change="onChange" /> <label for="expand">expand animation</label>
        </li>
        <li>
            <input ref="opacity" type="checkbox" checked="checked" @change="onChange" /> <label for="opacity">animate opacity</label>
        </li>
    </ul>
    <kendo-window ref="window1"
                  :width="'500px'"
                  :title="'About Alvar Aalto'"
                  :visible="visible"
                  style="display:none"
                  v-on:close="onClose"
                  v-on:open="onOpen">
        <p>Alvar Aalto is one of the greatest names in modern architecture and design. Glassblowers at the iittala factory still meticulously handcraft the legendary vases that are variations on one theme, fluid organic shapes that let the end user decide the use. Interpretations of the shape in new colors and materials add to the growing Alvar Aalto Collection that remains true to his original design.</p>
        <p>Born Hugo Alvar Henrik Aalto (February 3, 1898 - May 11, 1976) in Kuortane, Finland, was noted for his humanistic approach to modernism. He studied architecture at the Helsinki University of Technology from 1916 to 1921. In 1924 he married architect Aino Marsio.</p>
        <p>Alvar Aalto was one of the first and most influential architects of the Scandinavian modern movement, and a member of the Congres Internationaux d'Architecture Moderne. Major architectural works include the Finlandia Hall in Helsinki, Finland, and the campus of Helsinki University of Technology.</p>
    </kendo-window>
    <span id="undo" ref="undo" style="display:none" class="k-button hidden-on-narrow" v-on:click="openWindow">Click here to open the window.</span>
</div>
Vue.use(WindowInstaller);

new Vue({
    el: '#vueapp',
    data () {
        return {
            visible: true
        }
    },
    methods: {
        getEffects: function () {
            return (($(this.$refs.expand)[0].checked ? "expand:vertical " : "") +
                    ($(this.$refs.opacity)[0].checked ? "fadeIn" : "")) || false;
        },
        onChange: function (ev) {
            var win = this.$refs.window1.kendoWidget();
            var vm = this;
            var animation = {};

            win.close();

            if (!$(this.$refs.default)[0].checked) {
                animation = { open: { effects: vm.getEffects() }, close: { effects: vm.getEffects(), reverse: true} };
            }
            else {
                animation = { open: { effects: "fade:in" }, close: { effects: "fade:out", reverse: true} };
            }

            setTimeout(function () {
                win.setOptions({ animation: animation });
                win.open();
            }, 200);
        },
        onClose: function (ev) {
            $(this.$refs.undo).fadeIn();
        },
        onOpen: function (ev) {
            $(this.$refs.undo).hide();
        },
        openWindow: function (ev) {
            var win = this.$refs.window1.kendoWidget();
            win.open();
        }
    }
})

In this article