Update state of the landscape brick view as well to be consistent with the portrait view (main) (#508)

This commit is contained in:
Sam El-Husseini
2018-04-13 14:01:37 -07:00
committed by GitHub
parent 7f8499bb5f
commit 3e534f7329
4 changed files with 53 additions and 7 deletions

View File

@ -388,7 +388,8 @@ namespace pxsim.visuals {
})
}
// Kill the brick
this.layoutView.getBrick().kill();
this.layoutView.getPortraitBrick().kill();
this.layoutView.getLandscapeBrick().kill();
// Save previous inputs for the next cycle
EV3View.previousSelectedInputs = ev3board().getInputNodes().map((node, index) => (this.getDisplayViewForNode(node.id, index).getSelected()) ? node.id : -1)
@ -474,7 +475,8 @@ namespace pxsim.visuals {
const brickNode = ev3board().getBrickNode();
if (brickNode.didChange()) {
this.getDisplayViewForNode(brickNode.id, -1).updateState();
this.layoutView.getPortraitBrick().updateState();
this.layoutView.getLandscapeBrick().updateState();
}
const outputNodes = ev3board().getMotors();