Skip to content

Commit

Permalink
Fix #6002: WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
git-user committed Jun 28, 2023
1 parent fc2015d commit e5ae164
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions sirepo/package_data/static/js/silas.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ SIREPO.app.controller('SourceController', function (appState, frameCache, persis
self.simScope = $scope;
self.simAnalysisModel = 'laserPulseAnimation';

self.hasOldData = () => {
return appState.models.hasOldData;
};
self.hasOldData = () => appState.models.hasOldData;

self.simHandleStatus = (data) => {
if (! appState.isLoaded()) {
Expand All @@ -113,6 +111,11 @@ SIREPO.app.controller('SourceController', function (appState, frameCache, persis
const updateHasOldData = (dataIsOld) => {
appState.models.hasOldData = dataIsOld;
appState.saveChanges('hasOldData');
if (dataIsOld) {
srdbg("appState.models", appState.models);
// self.simState.runSimulation();
}
srdbg(self.simState);
};

self.simState = persistentSimulation.initSimulationState(self);
Expand Down
2 changes: 1 addition & 1 deletion sirepo/package_data/static/js/sirepo-beamline.js
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ SIREPO.app.directive('beamlineAnimation', function(appState, frameCache, persist
<div class="col-sm-12" data-simulation-status-timer="simState"></div>
<button class="btn btn-default pull-right" data-ng-click="start()" data-ng-show="simState.isStopped()">Start New Simulation</button>
<button class="btn btn-default pull-right" data-ng-click="simState.cancelSimulation()" data-ng-show="simState.isProcessing()">End Simulation</button>
</div>
</div>
<div class="col-sm-5 col-md-4 col-lg-3" style="margin-top: 1ex">
<div data-pending-link-to-simulations="" data-sim-state="simState"></div>
<div data-ng-show="simState.isStateRunning()">
Expand Down

0 comments on commit e5ae164

Please sign in to comment.