Skip to content

Commit

Permalink
[FIX] Marlin rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneclaes committed Sep 21, 2020
1 parent 564b0fd commit 2f3218d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/app/lib/active-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,14 @@ class ActiveState {
this._modal = _.get(controllerState, this.modalStateKey) || {};
this._mpos = _.get(controllerState, this.mposKey);
this._wpos = _.get(controllerState, this.wposKey);
this.error = _.get(controllerState, 'status.error');
this.alarm = _.get(controllerState, 'status.alarm');
if (_.has(controllerState, 'status')) {
const status = controllerState.status;
this.error = status.error;
this.alarm = status.alarm;
} else {
this.error = null;
this.alarm = null;
}
}

get modalStateKey() {
Expand Down
4 changes: 2 additions & 2 deletions src/app/widgets/Visualizer/Visualizer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -858,10 +858,10 @@ class Visualizer extends Component {

// Move the visualizer to the work position
updateVisualizerPosition() {
if (!this.rendered) {
const wco = this.wco;
if (!this.rendered || !wco) {
return;
}
const wco = this.wco;
this.rendered.position.set(wco.x, wco.y, wco.z);
}

Expand Down

0 comments on commit 2f3218d

Please sign in to comment.