Skip to content

Allow diff interruption #56

@ronkorving

Description

@ronkorving

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();
  });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions