Skip to content

Commit

Permalink
Fix Layout Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
UnchartedBull committed Jul 15, 2019
1 parent ff04e1f commit c1653cb
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 13 deletions.
11 changes: 6 additions & 5 deletions src/app/display-layer-progress.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ export class DisplayLayerProgressService {
}
this.httpRequest = this.http.get(this.configService.config.octoprint.url + 'plugin/DisplayLayerProgress', httpHeaders).subscribe(
(data: JSON) => {
observer.next({
current: data['layer']['current'] === '-' ? 0 : data['layer']['current'],
total: data['layer']['total'] === '-' ? 0 : data['layer']['total'],
fanSpeed: data['fanSpeed'] === '-' ? 0 : data['fanSpeed']
})
let fanSpeed =
observer.next({
current: data['layer']['current'] === '-' ? 0 : data['layer']['current'],
total: data['layer']['total'] === '-' ? 0 : data['layer']['total'],
fanSpeed: data['fanSpeed'] === '-' ? 0 : data['fanSpeed'] === 'Off' ? 0 : data['fanSpeed']
})
}, (error: HttpErrorResponse) => {
console.error('Can\'t retrieve layer progress! ' + error.message);
});
Expand Down
7 changes: 6 additions & 1 deletion src/app/job-status/job-status.component.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
.job-info {
height: 27vw;
display: block;
}

.job-info__no-job {
width: 100%;
font-size: 6vw;
height: 21.5vh;
height: 26vh;
margin-top: 19vh;
text-align: center;
}
Expand Down
1 change: 1 addition & 0 deletions src/app/job-status/job-status.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class JobStatusService {
this.httpRequest = this.http.get(this.configService.config.octoprint.url + 'job', httpHeaders).subscribe(
(data: JSON) => {
let job: Job = null;
console.log(data);
if (data['state'] === 'Printing') {
job = {
filename: data['job']['file']['display'].replace('.gcode', ''),
Expand Down
2 changes: 1 addition & 1 deletion src/app/layer-progress/layer-progress.component.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.layer-indication {
width: 100%;
display: block;
margin-top: 3vh;
margin-top: 1vh;
text-align: center;
font-size: 4vw;
}
Expand Down
14 changes: 10 additions & 4 deletions src/app/printer-status/printer-status.component.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
.printer-status {
width: 100%;
margin-top: 10.4vh;
margin-top: 3vh;
height: 23vh;
display: block;
table-layout: fixed;
overflow: visible;

& tr {
vertical-align: middle;
}
}

.printer-status__value {
text-align: right;
height: 16.5vh;
height: 23vh;
vertical-align: middle;

& img {
width: 10vw;
Expand All @@ -28,7 +34,7 @@
padding-right: 7.5vw;

& img {
width: 9.2vw;
width: 9.6vw;
}
}

Expand All @@ -38,7 +44,7 @@

& img {
padding-top: 1vh;
width: 11.5vw;
width: 10vw;
}
}
}
Expand Down
9 changes: 8 additions & 1 deletion src/assets/fan.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion src/assets/heat-bed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c1653cb

Please sign in to comment.