Skip to content

Commit

Permalink
Fix #6002: old data plots dont show
Browse files Browse the repository at this point in the history
  • Loading branch information
git-user committed Jun 26, 2023
1 parent be9e4bc commit 690357c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sirepo/package_data/static/html/silas-source.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
</div>
</div>
<div class="row">
<div data-ng-show="! source.oldData" class="row">
<div class="col-md-6" data-ng-if="source.simState.hasFrames()">
<div data-report-panel="{{ source.laserPulsePlotType('laserPulseAnimation') }}" data-model-name="laserPulseAnimation"></div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions sirepo/package_data/static/js/silas.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ SIREPO.app.controller('SourceController', function (appState, frameCache, persis
const self = this;
self.simScope = $scope;
self.simAnalysisModel = 'laserPulseAnimation';
self.oldData = false;

self.simHandleStatus = (data) => {
if (! appState.isLoaded()) {
Expand All @@ -107,6 +108,8 @@ SIREPO.app.controller('SourceController', function (appState, frameCache, persis
};

self.simState = persistentSimulation.initSimulationState(self);
$scope.$on('laserPulse.changed', () => self.oldData = true);
$scope.$on('framesCleared', () => self.oldData = false);
});

SIREPO.app.controller('BeamlineController', function (appState, beamlineService, $scope) {
Expand Down

0 comments on commit 690357c

Please sign in to comment.