Skip to content

Instantly share code, notes, and snippets.

@dbouwman

dbouwman/Viewer.js

Last active Dec 13, 2015
Embed
What would you like to do?
Simple Marionette Application with a global event debugger
/*global gmm */
if (!this.gmm || typeof this.gmm !== 'object') {
this.gmm = {};
}
(function () {
'use strict';
gmm.Viewer = new Backbone.Marionette.Application();
gmm.Viewer.addRegions({
toolsRegion: '#tool-list-region'
});
//debugging so we can see events flying around
gmm.Viewer.vent.on('all', function (evt, model) {
console.log('gmm.Viewer DEBUG: Event Caught: ' + evt);
if (model) {
console.dir(model);
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.