Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
shueja committed Mar 5, 2024
1 parent 59a0174 commit 0cb137e
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/document/HolonomicPathStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -807,19 +807,21 @@ export const HolonomicPathStore = types
// Anything accessed in here will cause the trajectory to be marked stale
// this is a reaction, not an autorun so that the effect does not happen
// when mobx first runs it to determine dependencies.
staleDisposer = reaction(() => {
toJS(self.waypoints);
toJS(self.constraints);
// does not need toJS to do a deep check on this, since it's just a boolean
self.usesControlIntervalGuessing;
toJS(self.obstacles);
return true;
},
(value) => {
if (value) {
self.setIsTrajectoryStale(true);
}
});
staleDisposer = reaction(
() => {
toJS(self.waypoints);
toJS(self.constraints);
// does not need toJS to do a deep check on this, since it's just a boolean
self.usesControlIntervalGuessing;
toJS(self.obstacles);
return true;
},
(value) => {
if (value) {
self.setIsTrajectoryStale(true);
}
}
);
autosaveDisposer = reaction(
() => {
if (self.generated.length == 0) {
Expand Down

0 comments on commit 0cb137e

Please sign in to comment.