Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow diff interruption #56

Open
ronkorving opened this issue Apr 14, 2016 · 0 comments
Open

Allow diff interruption #56

ronkorving opened this issue Apr 14, 2016 · 0 comments

Comments

@ronkorving
Copy link

When dealing with logic, the diff of a Tome is not always the only thing happening in a UI. There may be an animation, only after which we want certain changes to be reflected in the UI.

We need a good system that allows these diffs to be applied in bursts, controlled by the party that is applying a diff.

The idea I have right now that seems to be the most flexible is the following:

Server:

t.set('xp', 100);
t.set('xp', 110);
t.set('xp', 120);

Client:

t.xp.on('readable', function (oldValue) {
  t.pauseDiff();
  animateXp(oldValue, this.valueOf(), function () {
    t.resumeDiff();
  });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant