Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update angular-heatmap.js #370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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 @@
};
}]);

})();
})();