[Stacked plots] fixes scroll issue and removed redundant calls to backend (#3585)

* fixes scroll issue and removed redundant calls to backend

* change scroll to auto
This commit is contained in:
Deep Tailor 2020-12-08 10:10:50 -08:00 committed by GitHub
parent d80c0eef8e
commit ce8c31cfa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -39,10 +39,11 @@ define([], function () {
const thisRequest = { const thisRequest = {
pending: 0 pending: 0
}; };
currentRequest = thisRequest;
$scope.currentRequest = thisRequest;
const telemetryObjects = $scope.telemetryObjects = []; const telemetryObjects = $scope.telemetryObjects = [];
const thisTickWidthMap = {}; const thisTickWidthMap = {};
currentRequest = thisRequest;
$scope.currentRequest = thisRequest;
tickWidthMap = thisTickWidthMap; tickWidthMap = thisTickWidthMap;
if (unlisten) { if (unlisten) {
@ -52,14 +53,10 @@ define([], function () {
function addChild(child) { function addChild(child) {
const id = openmct.objects.makeKeyString(child.identifier); const id = openmct.objects.makeKeyString(child.identifier);
const legacyObject = openmct.legacyObject(child);
thisTickWidthMap[id] = 0; thisTickWidthMap[id] = 0;
thisRequest.pending += 1; telemetryObjects.push(legacyObject);
objectService.getObjects([id])
.then(function (objects) {
thisRequest.pending -= 1;
const childObj = objects[id];
telemetryObjects.push(childObj);
});
} }
function removeChild(childIdentifier) { function removeChild(childIdentifier) {
@ -84,6 +81,7 @@ define([], function () {
} }
thisRequest.pending += 1; thisRequest.pending += 1;
openmct.objects.get(domainObject.getId()) openmct.objects.get(domainObject.getId())
.then(function (obj) { .then(function (obj) {
thisRequest.pending -= 1; thisRequest.pending -= 1;

View File

@ -47,6 +47,7 @@ mct-plot {
.c-plot, .c-plot,
.gl-plot { .gl-plot {
overflow: hidden; overflow: hidden;
min-height: 100px;
.s-status-taking-snapshot & { .s-status-taking-snapshot & {
.c-control-bar { .c-control-bar {
@ -79,7 +80,8 @@ mct-plot {
display: flex; display: flex;
flex: 1 1 auto; flex: 1 1 auto;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow-y: auto;
overflow-x: hidden;
} }
&--stacked { &--stacked {