Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions plugins/angular-heatmap/angular-heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
'config': '='
},
link: function(scope, el, attrs) {
var domEl = el[0];
var computed = window.getComputedStyle(domEl);
var defaultCfg = {
let domEl = el[0];
let computed = window.getComputedStyle(domEl);
let defaultCfg = {
width: +attrs['width'] || +computed['width'].replace('px',''),
height: +attrs['height'] || +computed['height'].replace('px','')
};
var cfg = angular.merge({}, defaultCfg, scope['config'] || {});
let cfg = angular.merge({}, defaultCfg, scope['config'] || {});
cfg.container = domEl;
var heatmapInstance = h337.create(cfg);
let heatmapInstance = h337.create(cfg);

scope.heatmapInstance = heatmapInstance;
$heatmap.registerInstance(attrs.id || (+new Date)+'', heatmapInstance);
Expand All @@ -45,7 +45,7 @@
}
}])
.service('$heatmap', [function() {
var instances = {};
let instances = {};
return {
registerInstance: function(key, value) {
instances[key] = value;
Expand All @@ -59,4 +59,4 @@
};
}]);

})();
})();