2015-07-27 18:06:02 +02:00
|
|
|
'use strict';
|
|
|
|
|
2015-10-06 16:47:59 +02:00
|
|
|
import { altThirdParty } from '../alt';
|
2015-07-27 18:06:02 +02:00
|
|
|
import EventActions from '../actions/event_actions';
|
|
|
|
|
|
|
|
|
|
|
|
class DebugHandler {
|
|
|
|
constructor() {
|
|
|
|
let symbols = [];
|
|
|
|
|
|
|
|
for (let k in EventActions) {
|
|
|
|
if (typeof EventActions[k] === 'symbol') {
|
|
|
|
symbols.push(EventActions[k]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.bindListeners({
|
|
|
|
onWhateverEvent: symbols
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
onWhateverEvent() {
|
|
|
|
let args = arguments[0];
|
|
|
|
let symbol = arguments[1];
|
|
|
|
console.debug(symbol, args);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-06 16:47:59 +02:00
|
|
|
export default altThirdParty.createStore(DebugHandler, 'DebugHandler');
|