Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improves readability of floor numbers and makes better use of space in the "waiting area". #73

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@

<script type="text/template" id="floor-template">
<div class="floor" style="top: {yPosition}px">
<span class="floornumber">{level}</span>
<span class="buttonindicator">
<i class="fa fa-arrow-circle-up up"></i>
<i class="fa fa-arrow-circle-down down"></i>
</span>
<div class="floor-info">
<span class="buttonindicator">
<i class="fa fa-arrow-circle-up up"></i>
<i class="fa fa-arrow-circle-down down"></i>
</span>
<span class="floornumber">{level}</span>
</div>
</div>
</script>

Expand Down
26 changes: 17 additions & 9 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,12 @@ button.right {

.elevator {
background-color: #4F8686;
border: 2px solid white;
border: 1px outset slategray;
height: 46px;
z-index: 1;
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)
}

.elevator .directionindicator {
Expand Down Expand Up @@ -283,7 +286,7 @@ button.right {
width: 100%;
font-size: 15px;
text-align: center;
color: rgba(255, 255, 255, 0.3);
color: rgba(255, 255, 255, 0.5);
}

.elevator .buttonindicator {
Expand Down Expand Up @@ -314,25 +317,30 @@ button.right {
border-bottom: 1px solid #333;
}

.floor-info {
position: absolute;
background-color: #3F3F3F;
background-color: rgba(0, 0, 0, 0.3);
width: 35px;
padding: 5px 5px 0 60px;
height: 43px;
text-align: right;
}

.floor .buttonindicator {
cursor: pointer;
line-height: 50px;
padding-left: 50px;
color: rgba(255, 255, 255, 0.2);
}
.floor .buttonindicator .activated {
color: rgba(55, 255, 55, 1.0);
}

.floor .floornumber {
position: absolute;
color: rgba(255, 255, 255, 0.15);
font-size: 32px;
line-height: 50px;
padding-left: 10px;
font-size: 22px;
font-weight: bold;
}


.footer {
margin-top: 20px;
}
Expand Down
4 changes: 2 additions & 2 deletions world.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var createWorldCreator = function() {
};
creator.createElevators = function(elevatorCount, floorCount, floorHeight, elevatorCapacities) {
elevatorCapacities = elevatorCapacities || [4];
var currentX = 200.0;
var currentX = 100.0;
var elevators = _.map(_.range(elevatorCount), function(e, i) {
var elevator = asMovable({});
elevator = asElevator(elevator, 2.6, floorCount, floorHeight, elevatorCapacities[i%elevatorCapacities.length]);
Expand Down Expand Up @@ -45,7 +45,7 @@ var createWorldCreator = function() {

creator.spawnUserRandomly = function(floorCount, floorHeight, floors) {
var user = creator.createRandomUser(floorCount, floorHeight);
user.moveTo(105+_.random(40), 0);
user.moveTo(5+_.random(45), 0);
var currentFloor = _.random(1) === 0 ? 0 : _.random(floorCount - 1);
var destinationFloor;
if(currentFloor === 0) {
Expand Down