Controllers.prototype.heatmaps = (function () { "use strict"; function newHeatmap(core, target, returnCB) { return new Heatmap(core, target, returnCB); } function Heatmap(core, target, returnCB) { var hm = null, req = new Request(); this.exit = exit; new ApiManager(req, core.userID, init); function init(err, e) { if (!!err) { console.error(err); return; } returnCB(); hm = new heatmaps.Heatmaps(target, e); } function exit(){ if(!hm) { return; } hm.exit(); } } function Request() { this.clicks = { "source": "clicks/alltime" }; this.adsList = null; } return newHeatmap; })();