Commit graph

6 commits

Author SHA1 Message Date
David Chan 9004a66274 Fix initialisation errors in EventSequencer
ve.EventSequencer.js:
* Initialise listener lists to []
* Call afterLoop listeners even if there are no after listeners

Change-Id: I63a0bafa74f2c3135bd3ca75adc91a57c19319ed
2013-10-08 00:24:45 +01:00
David Chan e515017827 EventSequencer: New hooks for useful moments
ve.EventSequencer.js - Implement new types of event listener:
* onLoop( f ) to set a listener for the start of the event loop
* afterLoop( f ) to set a listener for the end of the event loop
* afterOne( f ) to set a one-time listener for after an event
* afterLoopOne( f ) to set a one-time listener for the end of the event loop

Change-Id: Ie388e0e9edcfccaa20e04c649a8b85d028ddde9c
2013-10-07 22:21:21 +00:00
Ed Sanders 232856e172 Fix function naming conventions, comments and whitespace
* Convert some spaces to tabs
* Move private function to top and document
* Give constructor a global name

Change-Id: I7ec144303d32b1bb454b4164222601c263fb75bf
2013-09-17 19:37:08 +01:00
Ed Sanders 8fb2f4467d Remove ve.log debugging calls from EventSequencer
Change-Id: I642acf09e7ed52d6dbf4312e054134b264c3428d
2013-09-16 18:44:33 +01:00
David Chan 8e77752deb Timoize the EventSequencer into a sleek, purring monster
Change-Id: Ia925d76d9a41b777861621724ced4db8371786b8
2013-09-06 17:30:50 -07:00
David Chan 793172e41e ve.EventSequencer: Post-event listening
modules/ve/ve.EventSequencer.js
* Class to sequence pre-event and post-event listening correctly

demos/ve/eventSequencer.html
* Plain HTML example page for testing EventSequencer and event sequences

Change-Id: I4ddb10a30c2f44015136a7978a185d0b13f0690b
2013-09-04 11:20:46 -07:00