Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

How to temporarily block view from refreshing

$
0
0

@beddu wrote:

My Ember app is auto-refreshing certain routes on a regular time basis like this:

import Ember from ‘ember’;

export default Ember.Route.extend({ model() { //returns a promise },

afterModel()
{
    Ember.run.later(this, function()
        {
            this.refresh();
        }
    , 2000);
}

});

and, as expected, the page’s data is updated accordingly by Ember. The app’s CSS defines some animations used to present document’s structure updates smoothly to the user, for example, when a component is resized by Javascript code event handler (“click to expand” effect). Unfortunately, when the data is updated while a CSS animation is running, the animation is truncated and jumps to the end.

Any way to prevent this? I was thinking about preventing the component’s data from being updated for the period of time in which the animation is running.

Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles