Skip to content

Instantly share code, notes, and snippets.

@yayitswei
Created April 9, 2013 08:42
Show Gist options
  • Select an option

  • Save yayitswei/5344078 to your computer and use it in GitHub Desktop.

Select an option

Save yayitswei/5344078 to your computer and use it in GitHub Desktop.
define(["scripts/match"], function(cycle, main){
var Gadget = function(player, config, $el) {
cljs.match.init(player, config, $el);
player.on('toggleEdit', this.toggleEdit, this);
player.on('configChange', this.update, this);
player.on('render', this.render, this);
};
Gadget.prototype.update = function(config) {
cljs.match.update(config);
};
Gadget.prototype.render = function() {
cljs.match.render();
};
Gadget.prototype.toggleEdit = function(editable) {
cljs.match.set_editing(editable);
};
return Gadget;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment