soma.js
Version:
soma.js is a javascript framework created to build scalable and maintainable applications.
26 lines (21 loc) • 722 B
JavaScript
// Generated by CoffeeScript 1.6.2
(function() {
(function(clock) {
"use strict"; return clock.ClockMediator = (function() {
function ClockMediator(target, dispatcher, mediators, timer) {
var currentClock;
currentClock = null;
dispatcher.addEventListener('create', function(event) {
if (currentClock) {
timer.remove(currentClock.update);
currentClock.dispose();
}
currentClock = mediators.create(event.params, target);
timer.add(currentClock.update);
return currentClock.update(timer.time);
});
}
return ClockMediator;
})();
})(window.clock = window.clock || {});
}).call(this);