WIP reworking of skinning and app integration process
This commit is contained in:
+10
-14
@@ -17,21 +17,17 @@ limitations under the License.
|
||||
'use strict';
|
||||
|
||||
var flux = require("flux");
|
||||
var extend = require("./extend");
|
||||
|
||||
var MatrixDispatcher = function() {
|
||||
flux.Dispatcher.call(this);
|
||||
class MatrixDispatcher extends flux.Dispatcher {
|
||||
dispatch(payload) {
|
||||
if (this.dispatching) {
|
||||
setTimeout(super.dispatch.bind(this, payload), 0);
|
||||
} else {
|
||||
this.dispatching = true;
|
||||
super.dispatch.call(this, payload);
|
||||
this.dispatching = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
extend(MatrixDispatcher.prototype, flux.Dispatcher.prototype);
|
||||
MatrixDispatcher.prototype.dispatch = function(payload) {
|
||||
if (this.dispatching) {
|
||||
setTimeout(flux.Dispatcher.prototype.dispatch.bind(this, payload), 0);
|
||||
} else {
|
||||
this.dispatching = true;
|
||||
flux.Dispatcher.prototype.dispatch.call(this, payload);
|
||||
this.dispatching = false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new MatrixDispatcher();
|
||||
|
||||
+5
-1
@@ -16,4 +16,8 @@ limitations under the License.
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports.ComponentBroker = require("./ComponentBroker");
|
||||
module.exports.atoms = {};
|
||||
module.exports.molecules = {};
|
||||
module.exports.organisms = {};
|
||||
module.exports.templates = {};
|
||||
module.exports.pages = {};
|
||||
|
||||
Reference in New Issue
Block a user