Merge branch 'master' into new-folder-action

This commit is contained in:
Deep Tailor 2020-06-25 10:08:26 -07:00 committed by GitHub
commit 7e4aac028b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 15 additions and 38 deletions

View File

@ -20,20 +20,13 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
export default class LADTableCompositionPolicy {
constructor(openmct) {
this.openmct = openmct;
return this.allow.bind(this);
}
allow(parent, child) {
export default function ladTableCompositionPolicy(openmct) {
return function (parent, child) {
if(parent.type === 'LadTable') {
return this.openmct.telemetry.isTelemetryObject(child);
return openmct.telemetry.isTelemetryObject(child);
} else if(parent.type === 'LadTableSet') {
return child.type === 'LadTable';
}
return true;
}
}

View File

@ -21,7 +21,7 @@
*****************************************************************************/
import LADTableViewProvider from './LADTableViewProvider';
import LADTableSetViewProvider from './LADTableSetViewProvider';
import LADTableCompositionPolicy from './LADTableCompositionPolicy';
import ladTableCompositionPolicy from './LADTableCompositionPolicy';
export default function plugin() {
return function install(openmct) {
@ -49,6 +49,6 @@ export default function plugin() {
}
});
openmct.composition.addPolicy(new LADTableCompositionPolicy(openmct));
openmct.composition.addPolicy(ladTableCompositionPolicy(openmct));
};
}

View File

@ -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,

View File

@ -22,13 +22,11 @@
/*global define*/
define([
'lodash',
'EventEmitter',
'./Model',
'../lib/extend',
'../lib/eventHelpers'
], function (
_,
EventEmitter,
Model,
extend,

View File

@ -22,11 +22,9 @@
define([
'lodash',
'EventEmitter',
'../lib/eventHelpers'
], function (
_,
EventEmitter,
eventHelpers
) {

View File

@ -22,11 +22,9 @@
define([
'lodash',
'EventEmitter',
'../lib/eventHelpers'
], function (
_,
EventEmitter,
eventHelpers
) {

View File

@ -23,13 +23,11 @@
define([
'../configuration/configStore',
'../lib/eventHelpers',
'objectUtils',
'lodash'
'objectUtils'
], function (
configStore,
eventHelpers,
objectUtils,
_
objectUtils
) {
function PlotOptionsController($scope, openmct, $timeout) {

View File

@ -21,11 +21,9 @@
*****************************************************************************/
define([
'./PlotModelFormController',
'lodash'
'./PlotModelFormController'
], function (
PlotModelFormController,
_
PlotModelFormController
) {
var PlotYAxisFormController = PlotModelFormController.extend({

View File

@ -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);