mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 07:38:15 +00:00
Upgrade angular from 1.4.14 to 1.7.9 (#2955)
* successfully upgraded to v1.6 with $compileProvider.preAssignBindingsEnabled(true) * removed $compileProvider.preAssignBindingsEnabled(true), wrapped constructors for plot and chart inside onInit function Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
@ -54,27 +54,29 @@ function (
|
||||
* @constructor
|
||||
*/
|
||||
function MCTChartController($scope) {
|
||||
this.$scope = $scope;
|
||||
this.isDestroyed = false;
|
||||
this.lines = [];
|
||||
this.pointSets = [];
|
||||
this.alarmSets = [];
|
||||
this.offset = {};
|
||||
this.config = $scope.config;
|
||||
this.listenTo(this.$scope, '$destroy', this.destroy, this);
|
||||
this.draw = this.draw.bind(this);
|
||||
this.scheduleDraw = this.scheduleDraw.bind(this);
|
||||
this.seriesElements = new WeakMap();
|
||||
this.$onInit = () => {
|
||||
this.$scope = $scope;
|
||||
this.isDestroyed = false;
|
||||
this.lines = [];
|
||||
this.pointSets = [];
|
||||
this.alarmSets = [];
|
||||
this.offset = {};
|
||||
this.config = $scope.config;
|
||||
this.listenTo(this.$scope, '$destroy', this.destroy, this);
|
||||
this.draw = this.draw.bind(this);
|
||||
this.scheduleDraw = this.scheduleDraw.bind(this);
|
||||
this.seriesElements = new WeakMap();
|
||||
|
||||
this.listenTo(this.config.series, 'add', this.onSeriesAdd, this);
|
||||
this.listenTo(this.config.series, 'remove', this.onSeriesRemove, this);
|
||||
this.listenTo(this.config.yAxis, 'change:key', this.clearOffset, this);
|
||||
this.listenTo(this.config.xAxis, 'change:key', this.clearOffset, this);
|
||||
this.listenTo(this.config.yAxis, 'change', this.scheduleDraw);
|
||||
this.listenTo(this.config.xAxis, 'change', this.scheduleDraw);
|
||||
this.$scope.$watch('highlights', this.scheduleDraw);
|
||||
this.$scope.$watch('rectangles', this.scheduleDraw);
|
||||
this.config.series.forEach(this.onSeriesAdd, this);
|
||||
this.listenTo(this.config.series, 'add', this.onSeriesAdd, this);
|
||||
this.listenTo(this.config.series, 'remove', this.onSeriesRemove, this);
|
||||
this.listenTo(this.config.yAxis, 'change:key', this.clearOffset, this);
|
||||
this.listenTo(this.config.xAxis, 'change:key', this.clearOffset, this);
|
||||
this.listenTo(this.config.yAxis, 'change', this.scheduleDraw);
|
||||
this.listenTo(this.config.xAxis, 'change', this.scheduleDraw);
|
||||
this.$scope.$watch('highlights', this.scheduleDraw);
|
||||
this.$scope.$watch('rectangles', this.scheduleDraw);
|
||||
this.config.series.forEach(this.onSeriesAdd, this);
|
||||
}
|
||||
}
|
||||
|
||||
eventHelpers.extend(MCTChartController.prototype);
|
||||
|
@ -34,25 +34,27 @@ define([
|
||||
* values near the cursor.
|
||||
*/
|
||||
function MCTPlotController($scope, $element, $window) {
|
||||
this.$scope = $scope;
|
||||
this.$scope.config = this.config;
|
||||
this.$scope.plot = this;
|
||||
this.$element = $element;
|
||||
this.$window = $window;
|
||||
this.$onInit = () => {
|
||||
this.$scope = $scope;
|
||||
this.$scope.config = this.config;
|
||||
this.$scope.plot = this;
|
||||
this.$element = $element;
|
||||
this.$window = $window;
|
||||
|
||||
this.xScale = new LinearScale(this.config.xAxis.get('displayRange'));
|
||||
this.yScale = new LinearScale(this.config.yAxis.get('displayRange'));
|
||||
this.xScale = new LinearScale(this.config.xAxis.get('displayRange'));
|
||||
this.yScale = new LinearScale(this.config.yAxis.get('displayRange'));
|
||||
|
||||
this.pan = undefined;
|
||||
this.marquee = undefined;
|
||||
this.pan = undefined;
|
||||
this.marquee = undefined;
|
||||
|
||||
this.chartElementBounds = undefined;
|
||||
this.tickUpdate = false;
|
||||
this.chartElementBounds = undefined;
|
||||
this.tickUpdate = false;
|
||||
|
||||
this.$scope.plotHistory = this.plotHistory = [];
|
||||
this.listenTo(this.$scope, 'plot:clearHistory', this.clear, this);
|
||||
this.$scope.plotHistory = this.plotHistory = [];
|
||||
this.listenTo(this.$scope, 'plot:clearHistory', this.clear, this);
|
||||
|
||||
this.initialize();
|
||||
this.initialize();
|
||||
}
|
||||
}
|
||||
|
||||
MCTPlotController.$inject = ['$scope', '$element', '$window'];
|
||||
|
@ -114,15 +114,17 @@ define([
|
||||
}
|
||||
|
||||
function MCTTicksController($scope, $element) {
|
||||
this.$scope = $scope;
|
||||
this.$element = $element;
|
||||
this.$onInit = () => {
|
||||
this.$scope = $scope;
|
||||
this.$element = $element;
|
||||
|
||||
this.tickCount = 4;
|
||||
this.tickUpdate = false;
|
||||
this.listenTo(this.axis, 'change:displayRange', this.updateTicks, this);
|
||||
this.listenTo(this.axis, 'change:format', this.updateTicks, this);
|
||||
this.listenTo(this.$scope, '$destroy', this.stopListening, this);
|
||||
this.updateTicks();
|
||||
this.tickCount = 4;
|
||||
this.tickUpdate = false;
|
||||
this.listenTo(this.axis, 'change:displayRange', this.updateTicks, this);
|
||||
this.listenTo(this.axis, 'change:format', this.updateTicks, this);
|
||||
this.listenTo(this.$scope, '$destroy', this.stopListening, this);
|
||||
this.updateTicks();
|
||||
}
|
||||
}
|
||||
|
||||
MCTTicksController.$inject = ['$scope', '$element'];
|
||||
|
Reference in New Issue
Block a user