1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-16 00:00:03 +01:00
VILLASweb/src/app-dispatcher.js
Markus Grigull 7161ea7adc Add unique simulator sockets
Add automatic simulator-data load
Add missing widget-value component
2017-03-08 15:41:53 +01:00

28 lines
817 B
JavaScript

/**
* File: app-dispatcher.js
* Author: Markus Grigull <mgrigull@eonerc.rwth-aachen.de>
* Date: 02.03.2017
* Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC
* This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential.
* Unauthorized copying of this file, via any medium is strictly prohibited.
**********************************************************************************/
import { Dispatcher } from 'flux';
class AppDispatcher extends Dispatcher {
dispatch(payload) {
if (this.isDispatching()) {
// try again later
var self = this;
setTimeout(function() {
self.dispatch(payload);
}, 1);
} else {
// do actual dispatch
super.dispatch(payload);
}
}
}
export default new AppDispatcher();