Skip to content

Commit

Permalink
Add floorplan-specific back button; Hide speech button in floorplan e…
Browse files Browse the repository at this point in the history
…dit mode
  • Loading branch information
hobinjk committed Jul 30, 2018
1 parent 0f207bd commit 1cb38b1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions static/css/floorplan.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#floorplan-view.edit {
background-color: #305067;
z-index: 50;
}

#floorplan {
Expand Down Expand Up @@ -79,6 +80,18 @@
background-color: transparent;
}

#floorplan-back-button {
top: 2rem;
left: 2rem;
background-image: url('../optimized-images/back.png');
background-color: transparent;
display: none;
}

#floorplan-view.edit #floorplan-back-button {
display: block;
}

#floorplan-upload-form {
position: fixed;
width: 100%;
Expand Down
1 change: 1 addition & 0 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<button id="floorplan-upload-button" class="text-button">Upload floorplan...</button>
<div class="hint">(.svg recommended)</div>
</form>
<button id="floorplan-back-button" class="icon-button"></button>
<button id="floorplan-edit-button" class="icon-button"></button>
<button id="floorplan-done-button" class="hidden icon-button"></button>
<input id="floorplan-file-input" type="file" name="upload"
Expand Down
2 changes: 2 additions & 0 deletions static/js/floorplan.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const FloorplanScreen = {
this.menuButton = document.getElementById('menu-button');
this.editButton = document.getElementById('floorplan-edit-button');
this.doneButton = document.getElementById('floorplan-done-button');
this.backButton = document.getElementById('floorplan-back-button');
this.uploadForm = document.getElementById('floorplan-upload-form');
this.uploadButton = document.getElementById('floorplan-upload-button');
this.fileInput = document.getElementById('floorplan-file-input');
Expand All @@ -62,6 +63,7 @@ const FloorplanScreen = {

this.editButton.addEventListener('click', this.edit.bind(this));
this.doneButton.addEventListener('click', this.done.bind(this));
this.backButton.addEventListener('click', this.done.bind(this));
this.uploadButton.addEventListener('click', this.requestFile.bind(this));
this.uploadForm.addEventListener('submit', this.blackHole);
this.fileInput.addEventListener('change', this.upload.bind(this));
Expand Down

0 comments on commit 1cb38b1

Please sign in to comment.