From a22e4daa873addedcd2365ae811506971d6d8680 Mon Sep 17 00:00:00 2001 From: Rohit Paul <113459757+RohitPaul0007@users.noreply.github.com> Date: Sun, 3 Sep 2023 18:02:29 +0530 Subject: [PATCH] Update angular-heatmap.js --- plugins/angular-heatmap/angular-heatmap.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/angular-heatmap/angular-heatmap.js b/plugins/angular-heatmap/angular-heatmap.js index 8cf4de9b..e6520ba3 100644 --- a/plugins/angular-heatmap/angular-heatmap.js +++ b/plugins/angular-heatmap/angular-heatmap.js @@ -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); @@ -45,7 +45,7 @@ } }]) .service('$heatmap', [function() { - var instances = {}; + let instances = {}; return { registerInstance: function(key, value) { instances[key] = value; @@ -59,4 +59,4 @@ }; }]); -})(); \ No newline at end of file +})();