From 4380a273915de32a5401c51a69ce0ff1b446abf6 Mon Sep 17 00:00:00 2001 From: Emmanuel Kasper Date: Mon, 15 Jun 2015 15:31:13 +0200 Subject: [PATCH] Add documentation header --- www/manager5/data/DiffStore.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/www/manager5/data/DiffStore.js b/www/manager5/data/DiffStore.js index b118c596..66bcfed1 100644 --- a/www/manager5/data/DiffStore.js +++ b/www/manager5/data/DiffStore.js @@ -1,5 +1,19 @@ +/* + * The DiffStore acts as proxy between an UpdateStore instance and a component. + * Its purpose is to redisplay the component *only* if the data has been changed + * inside the UpdateStore, to avoid the annoying visual flickering of using + * the UpdateStore directly. + * + * Implementation: + * The DiffStore monitors via mon() the 'load' events sent by the target store. + * On each 'load' event, the DiffStore compares its own content with the target + * store (call to cond_add_item()) and then fires a 'refresh' event. + * The 'refresh' event will automatically trigger a view refresh on the component + * who binds to this store. + */ + /* Config properties: - * rstore: A storage to track changes + * rstore: A target store to track changes * Only works if rstore has a model and use 'idProperty' */ Ext.define('PVE.data.DiffStore', { -- 2.39.5