Skip to content
Browse files

Move Element.Delegation into Element.Event.Pseudos

  • Loading branch information...
1 parent da22b76 commit 6d5858e472c8d5e88353dfb364ce0910d4c7fa28 @arian arian committed
Showing with 7 additions and 36 deletions.
  1. +4 −6 Source/Class/Events.Pseudos.js
  2. +0 −26 Source/Element/Element.Delegation.js
  3. +3 −3 Source/Element/Element.Event.Pseudos.js
  4. +0 −1 package.yml
View
10 Source/Class/Events.Pseudos.js
@@ -72,24 +72,22 @@ Events.Pseudos = function(pseudos, addEvent, removeEvent){
eventType = split[0].event,
args = Array.slice(arguments, 2),
stack = fn,
- self = this,
- monitor;
+ self = this;
split.each(function(item){
var listener = item.listener,
stackFn = stack;
if (listener == false) eventType += ':' + item.pseudo + '(' + item.value + ')';
else stack = function(){
- listener.call(self, item, stackFn, arguments, monitor);
+ listener.call(self, item, stackFn, arguments, stack);
};
});
- monitor = stack.bind(this);
- events.include({type: eventType, event: fn, monitor: monitor});
+ events.include({type: eventType, event: fn, monitor: stack});
storage.store(type, events);
if (type != eventType) addEvent.apply(this, [type, fn].concat(args));
- return addEvent.apply(this, [eventType, monitor].concat(args));
+ return addEvent.apply(this, [eventType, stack].concat(args));
},
removeEvent: function(type, fn){
View
26 Source/Element/Element.Delegation.js
@@ -1,26 +0,0 @@
-/*
----
-
-script: Element.Delegation.js
-
-name: Element.Delegation
-
-description: Extends the Element native object to include the delegate method for more efficient event management.
-
-credits:
- - "Event checking based on the work of Daniel Steigerwald. License: MIT-style license. Copyright: Copyright (c) 2008 Daniel Steigerwald, daniel.steigerwald.cz"
-
-license: MIT-style license
-
-authors:
- - Aaron Newton
- - Daniel Steigerwald
-
-requires: [Core/Element.Delegation, /MooTools.More, Element.Event.Pseudos]
-
-provides: [Element.Delegation]
-
-...
-*/
-
-Event.definePseudo('relay', false);
View
6 Source/Element/Element.Event.Pseudos.js
@@ -10,16 +10,16 @@ license: MIT-style license
authors:
- Arian Stolwijk
-requires: [Core/Element.Event, Events.Pseudos]
+requires: [Core/Element.Event, Core/Element.Delegation, Events.Pseudos]
-provides: [Element.Event.Pseudos]
+provides: [Element.Event.Pseudos, Element.Delegation]
...
*/
(function(){
-var pseudos = {},
+var pseudos = {relay: false},
copyFromEvents = ['once', 'throttle', 'pause'],
count = copyFromEvents.length;
View
1 package.yml
@@ -36,7 +36,6 @@ sources:
- "Source/Element/Elements.From.js"
- "Source/Element/Element.Event.Pseudos.js"
- "Source/Element/Element.Event.Pseudos.Keys.js"
- - "Source/Element/Element.Delegation.js"
- "Source/Element/Element.Measure.js"
- "Source/Element/Element.Pin.js"
- "Source/Element/Element.Position.js"

0 comments on commit 6d5858e

Please sign in to comment.
Something went wrong with that request. Please try again.