Skip to content

Commit

Permalink
fixed webcam calibrate bug and target screen styling
Browse files Browse the repository at this point in the history
  • Loading branch information
dbecker1 committed Apr 1, 2020
1 parent 7498d45 commit f1476b2
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 85 deletions.
149 changes: 68 additions & 81 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/components/ProjectorScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ProjectorScreenInner extends React.Component {
<h1>Put this screen on your projector!</h1>
<h3>Resize the window to take the full screen and then click the button below</h3>
<p>Height: {this.state.height}<br />Width: {this.state.width}</p>
<Button onClick={() => {this.doneResizing()}}>I'm done resizing!</Button>
<Button variant="customPrimary" onClick={() => {this.doneResizing()}}>I'm done resizing!</Button>
</Col>
</Row>
);
Expand Down Expand Up @@ -119,7 +119,7 @@ class ProjectorScreen extends React.Component {
render() {
return (
<NewWindow ref={this.windowRef} name={WINDOW_NAME}>
<div style={{ height: "100vh", width: "100vw"}}>
<div style={{ height: "100vh", width: "100vw", backgroundColor: backgroundColor, color: color}}>
<ProjectorScreenInner height={this.state.height} width={this.state.width} targetScreenManager={this.props.targetScreenManager} onResizeFinish={this.props.onResizeFinish}/>
</div>
</NewWindow>
Expand Down
1 change: 1 addition & 0 deletions src/components/pages/CalibrateWebcam.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class CalibrateWebcam extends React.Component {

finishCalibrating() {
cookie.save("webcamConfig", {corners: this.calibrator.getCorners()})
this.props.targetScreenManager.wipeScreen();
this.props.changePage("welcome")
}

Expand Down
4 changes: 2 additions & 2 deletions src/util/WebcamCalibrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class WebcamCalibrator {

if (!!existingCorners) {
this.corners = existingCorners;
this.currentCorner = 5;
} else {
this.corners = [{}, {}, {}, {}];
this.currentCorner = 0;
}

this.currentCorner = 5;
}

start() {
Expand Down

0 comments on commit f1476b2

Please sign in to comment.