Esempio n. 1
0
VirtualdomCached.prototype.stepN = function VirtualdomCached_step() {
	if (!this.cache) return;
	var vdom = this.render();
	var diff = v.diff(this.vdom, vdom);
	v.applyPatch(this.el, diff);
	this.vdom = vdom;
};
Esempio n. 2
0
VirtualdomCached.prototype.step7 = function VirtualdomCached_step7() {
	if (!this.cache) return;
	// we *know* that `users[0]` changed
	var user = this.data.users[0];
	// so find all the data that has that user
	var modifiedData = this.data.data.filter(function (d) { return d.user === user; });
	// invalidate the cache for it
	var self = this;
	modifiedData.forEach(function (d) { self.cache.delete(d); });
	// and rerender
	var vdom = this.render();
	var diff = v.diff(this.vdom, vdom);
	v.applyPatch(this.el, diff);
	this.vdom = vdom;
};
Esempio n. 3
0
VirtualdomKeyed.prototype.stepN = function VirtualdomKeyed_step() {
	var vdom = this.render();
	var diff = v.diff(this.vdom, vdom);
	v.applyPatch(this.el, diff);
	this.vdom = vdom;
};