Lodash upgrade (#2885)

* upgraded lodash, changed method names
* native implementations as requested
This commit is contained in:
Joel McKinnon
2020-04-23 10:38:44 -07:00
committed by GitHub
parent 04a60cfcbb
commit d103a22fa0
13 changed files with 39 additions and 24 deletions

View File

@ -152,7 +152,7 @@ function (
MCTChartController.prototype.destroy = function () {
this.isDestroyed = true;
this.stopListening();
_.invoke(this.lines, 'destroy');
this.lines.map(line => line.destroy());
DrawLoader.releaseDrawAPI(this.drawAPI);
};

View File

@ -76,7 +76,7 @@ define([
if (childObj) {
var index = telemetryObjects.indexOf(childObj);
telemetryObjects.splice(index, 1);
$scope.$broadcast('plot:tickWidth', _.max(tickWidthMap));
$scope.$broadcast('plot:tickWidth', Math.max(...Object.values(tickWidthMap)));
}
}
@ -131,6 +131,7 @@ define([
}
tickWidthMap[plotId] = Math.max(width, tickWidthMap[plotId]);
var newTickWidth = _.max(tickWidthMap);
if (newTickWidth !== tickWidth || width !== tickWidth) {
tickWidth = newTickWidth;
$scope.$broadcast('plot:tickWidth', tickWidth);