mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 11:17:04 +00:00
[Plots] y-axis width fix (#3112)
* remove lodash native implementation of lodash max * remove unused lodash imports * add 'missing' semi-colon Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
This commit is contained in:
parent
f0dc928230
commit
9e5eddec9b
@ -30,8 +30,7 @@ define([
|
||||
'./MCTChartPointSet',
|
||||
'./MCTChartAlarmPointSet',
|
||||
'../draw/DrawLoader',
|
||||
'../lib/eventHelpers',
|
||||
'lodash'
|
||||
'../lib/eventHelpers'
|
||||
],
|
||||
function (
|
||||
MCTChartLineLinear,
|
||||
@ -39,8 +38,7 @@ function (
|
||||
MCTChartPointSet,
|
||||
MCTChartAlarmPointSet,
|
||||
DrawLoader,
|
||||
eventHelpers,
|
||||
_
|
||||
eventHelpers
|
||||
) {
|
||||
|
||||
var MARKER_SIZE = 6.0,
|
||||
|
@ -22,13 +22,11 @@
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
'lodash',
|
||||
'EventEmitter',
|
||||
'./Model',
|
||||
'../lib/extend',
|
||||
'../lib/eventHelpers'
|
||||
], function (
|
||||
_,
|
||||
EventEmitter,
|
||||
Model,
|
||||
extend,
|
||||
|
@ -22,11 +22,9 @@
|
||||
|
||||
|
||||
define([
|
||||
'lodash',
|
||||
'EventEmitter',
|
||||
'../lib/eventHelpers'
|
||||
], function (
|
||||
_,
|
||||
EventEmitter,
|
||||
eventHelpers
|
||||
) {
|
||||
|
@ -22,11 +22,9 @@
|
||||
|
||||
|
||||
define([
|
||||
'lodash',
|
||||
'EventEmitter',
|
||||
'../lib/eventHelpers'
|
||||
], function (
|
||||
_,
|
||||
EventEmitter,
|
||||
eventHelpers
|
||||
) {
|
||||
|
@ -23,13 +23,11 @@
|
||||
define([
|
||||
'../configuration/configStore',
|
||||
'../lib/eventHelpers',
|
||||
'objectUtils',
|
||||
'lodash'
|
||||
'objectUtils'
|
||||
], function (
|
||||
configStore,
|
||||
eventHelpers,
|
||||
objectUtils,
|
||||
_
|
||||
objectUtils
|
||||
) {
|
||||
|
||||
function PlotOptionsController($scope, openmct, $timeout) {
|
||||
|
@ -21,11 +21,9 @@
|
||||
*****************************************************************************/
|
||||
|
||||
define([
|
||||
'./PlotModelFormController',
|
||||
'lodash'
|
||||
'./PlotModelFormController'
|
||||
], function (
|
||||
PlotModelFormController,
|
||||
_
|
||||
PlotModelFormController
|
||||
) {
|
||||
|
||||
var PlotYAxisFormController = PlotModelFormController.extend({
|
||||
|
@ -20,12 +20,7 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
define([
|
||||
'lodash'
|
||||
], function (
|
||||
_
|
||||
) {
|
||||
|
||||
define([], function () {
|
||||
function StackedPlotController($scope, openmct, objectService, $element, exportImageService) {
|
||||
var tickWidth = 0,
|
||||
composition,
|
||||
@ -125,12 +120,13 @@ define([
|
||||
$scope.$watch('domainObject.getModel().composition', onCompositionChange);
|
||||
|
||||
$scope.$on('plot:tickWidth', function ($e, width) {
|
||||
var plotId = $e.targetScope.domainObject.getId();
|
||||
const plotId = $e.targetScope.domainObject.getId();
|
||||
if (!tickWidthMap.hasOwnProperty(plotId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
tickWidthMap[plotId] = Math.max(width, tickWidthMap[plotId]);
|
||||
var newTickWidth = _.max(tickWidthMap);
|
||||
const newTickWidth = Math.max(...Object.values(tickWidthMap));
|
||||
if (newTickWidth !== tickWidth || width !== tickWidth) {
|
||||
tickWidth = newTickWidth;
|
||||
$scope.$broadcast('plot:tickWidth', tickWidth);
|
||||
|
Loading…
Reference in New Issue
Block a user