Compare commits

...

1 Commits

Author SHA1 Message Date
317cb68b53 wip 2019-04-09 12:00:05 -07:00
4 changed files with 26 additions and 2 deletions

View File

@ -33,7 +33,8 @@ define([
formatString: '%0.2f',
hints: {
range: 1
}
},
filters: ['equals']
},
{
key: "cos",

View File

@ -84,7 +84,7 @@
openmct.install(openmct.plugins.Tabs());
openmct.install(openmct.plugins.FlexibleLayout());
openmct.install(openmct.plugins.LADTable());
openmct.install(openmct.plugins.Filters(['table', 'telemetry.plot.overlay']));
openmct.install(openmct.plugins.Filters(['table', 'telemetry.plot.overlay', 'telemetry.plot.stacked']));
openmct.install(openmct.plugins.ObjectMigration());
openmct.start();
</script>

View File

@ -80,6 +80,8 @@ define([
'configuration.filters',
this.updateFiltersAndResubscribe.bind(this)
);
this.listenTo($scope, 'filters:update', this.onFiltersUpdate, this);
}
eventHelpers.extend(PlotController.prototype);
@ -263,6 +265,10 @@ define([
});
};
PlotController.prototype.onFiltersUpdate = function ($event, updatedFilters) {
this.updateFiltersAndResubscribe(updatedFilters);
};
/**
* Export view as JPG.
*/

View File

@ -37,6 +37,11 @@ define([
this.exportImageService = exportImageService;
this.$scope = $scope;
this.cursorGuide = false;
this.domainObject = $scope.domainObject.useCapability('adapter');
var currentFilters = this.domainObject.configuration.filters;
$scope.currentFilters = this.currentFilters;
$scope.telemetryObjects = [];
@ -110,6 +115,12 @@ define([
}
}
function onFilterUpdate(filters) {
$scope.$broadcast('filters:update', filters);
currentFilters = filters;
}
$scope.$watch('domainObject', onDomainObjectChange);
$scope.$watch('domainObject.getModel().composition', onCompositionChange);
@ -129,6 +140,12 @@ define([
$scope.$on('plot:highlight:update', function ($e, point) {
$scope.$broadcast('plot:highlight:set', point);
});
var unobserve = openmct.objects.observe(this.domainObject, 'configuration.filters', onFilterUpdate);
$scope.$on('$destroy', function () {
unobserve();
});
}
StackedPlotController.prototype.exportJPG = function () {