Commit cbef6756 authored by boncoi's avatar boncoi
Browse files

Fix CSS, open/closeDoors and position indicators

parent 58055186
.sketch {
width: 100%;
height: 95vh;
background-color: #dbecf4;
display: flex;
justify-content: center;
align-items: center;
......@@ -31,6 +30,9 @@
.floorNumber{
width:33%;
display: flex;
justify-content: center;
align-items: center;
}
.floorButton{
......
......@@ -218,8 +218,8 @@ const inputFunction = {
0:sensorFloor,
1:upSensorFloor,
2:downSensorFloor,
3:openDoors,
4:closeDoors,
3:closeDoors,
4:openDoors,
5:buttonFloor,
6:cabinButtonFloor4,
7:function(){return;},
......
......@@ -32,7 +32,7 @@ function addFloor(cabinIsHere, floorNumber, doorState) {
let indicatorDownFloorImage = document.createElement('img');
indicatorDownFloorImage.classList.add("floorIndicator", "buttonsAndLight");
addImage(indicatorDownFloorImage,"IndicatorOFF","indicator floor down image", "png", "indicatorDF" + floorNumber);
left.append(indicatorUpFloorImage,indicatorFloorImage,indicatorDownFloorImage);
left.append(indicatorFloorImage,indicatorUpFloorImage,indicatorDownFloorImage);
let doorContainer = document.createElement("div");
doorContainer.classList.add("flexVerticalContainer","doorContainer");
......@@ -84,7 +84,7 @@ function addCabin(){
let containerRight = document.getElementById("drcIndicators");
containerRight.classList.add("flexHorizontalContainer");
for (let i=MAX_FLOOR; i>=0; i--) {
for (let i=0; i<MAX_FLOOR+1; i++) {
let drcIndicator = document.createElement("img");
drcIndicator.classList.add("lightCabin");
addImage(drcIndicator, "IndicatorOFF", "drc indicator floor " + i, "png", "drcIndicator" + i);
......@@ -115,7 +115,7 @@ function addCabin(){
let minFloorToPixels=80; // in %
let maxFloorToPixels=2; // in %
let keepAnimation=false;
let timeForOneFloor=2; // in s
let timeForOneFloor=1; // in s
let fps=60;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment