Prefix actions. fixes #33

This commit is contained in:
Dennis Eichhorn 2017-08-26 15:53:14 +02:00
parent 407067d6de
commit d02a57beb9

View File

@ -86,7 +86,7 @@
// if it has selector then a listener for child events must be implemented since these can potentially changed without any knowledge
// todo: what if the selector parent is different from "e"? then this doesn't make sense! Maybe this isn't allowed to happen!
if(hasSelector) {
this.app.eventManager.attach(e.id + 'childList', function(data) {
this.app.eventManager.attach('ACTION_MANAGER:' + e.id + 'childList', function(data) {
const length = data.addedNodes.length;
for(let j = 0; j < length; j++) {
@ -116,7 +116,7 @@
actionLength = listener.action.length;
for (let j = 1; j < actionLength; j++) {
this.app.eventManager.attach(e.id + listener.key + listener.action[j - 1].key, function (data)
this.app.eventManager.attach('ACTION_MANAGER:' + e.id + listener.key + listener.action[j - 1].key, function (data)
{
self.runAction(e, listener, listener.action[j], data);
}, false, true);
@ -162,7 +162,7 @@
this.actions[action.type](action, function (data)
{
self.app.eventManager.trigger(e.id + listener.key + action.key, e.id, data);
self.app.eventManager.trigger('ACTION_MANAGER:' + e.id + listener.key + action.key, e.id, data);
});
};