Skip to content

Commit

Permalink
Now spins and aligns correctly, all boxy and shit
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wallert committed Sep 30, 2016
1 parent dffa547 commit e5a2c2d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
2 changes: 2 additions & 0 deletions app/css/style.css
Expand Up @@ -21,6 +21,7 @@ li a img {
margin: 25%;
display: flex;
justify-content: center;
transform: rotate(-45deg);
}

/*.right {
Expand Down Expand Up @@ -52,6 +53,7 @@ li a img {
height: 700px;
width: 700px;
padding: 0;
transform: rotate(45deg);
}

#Nav>ul {
Expand Down
4 changes: 2 additions & 2 deletions app/index.html
Expand Up @@ -24,10 +24,10 @@
<a ui-sref="beer-one" id="Top"><img class="beer--logos ABA" src="images/beerwise-logo.png" alt="#"></a>
</li>
<li class="col-xs-6">
<a ui-sref="beer-two" id="Left"><img class="beer--logos BB" src="images/beer_bb.png" alt="#"></a>
<a ui-sref="beer-two" id="Right"><img class="beer--logos BB" src="images/beer_bb.png" alt="#"></a>
</li>
<li class="col-xs-6">
<a ui-sref="beer-four" id="Right"><img class="beer--logos other" src="images/casual_logo.png" alt="#"></a>
<a ui-sref="beer-four" id="Left"><img class="beer--logos other" src="images/casual_logo.png" alt="#"></a>
</li>
<li class="col-xs-6">
<a ui-sref="beer-three" id="Bottom"><img class="beer--logos duff" src="images/ABA_Logo.png" alt="#"></a>
Expand Down
54 changes: 27 additions & 27 deletions app/js/script.js
Expand Up @@ -2,39 +2,39 @@ var $ = jQuery;


$(document).ready(function() {
var wheelPosition = 0,
wheelRotation = 0,
imagePosition = 0;
var wheelPosition = 45,
wheelRotation = 45,
imagePosition = -45;

$('#Top').click(function() {
if (wheelPosition === 0) {
if (wheelPosition === 45) {
logoRotation(90);
} else if (wheelPosition == 180) {
} else if (wheelPosition === 225) {
logoRotation(-90);
}
else return;
});

$('#Right').click(function() {
if (wheelPosition == 90) {
if (wheelPosition == 135) {
logoRotation(-90);
} else if (wheelPosition === 270) {
} else if (wheelPosition === 315) {
logoRotation(90);
} else return;
});

$('#Bottom').click(function() {
if (wheelPosition === 0) {
if (wheelPosition === 45) {
logoRotation(-90);
} else if (wheelPosition == 180) {
} else if (wheelPosition === 225) {
logoRotation(90);
} else return;
});

$('#Left').click(function() {
if (wheelPosition == 90) {
if (wheelPosition === 135) {
logoRotation(90);
} else if (wheelPosition == 270) {
} else if (wheelPosition === 315) {
logoRotation(-90);
} else return;
});
Expand All @@ -43,38 +43,38 @@ $(document).ready(function() {
wheelRotation += direction;
imagePosition -= direction;

if (wheelPosition === 0 && direction == 90) {
if (wheelPosition === 45 && direction == 90) {
$('.beer--logos').css('transform', 'rotate(' + imagePosition + 'deg)');
$('#Nav').css('transform', 'rotate(' + wheelRotation + 'deg)');
wheelPosition = 90;
} else if (wheelPosition === 0 && direction == -90) {
wheelPosition = 135;
} else if (wheelPosition === 45 && direction == -90) {
$('.beer--logos').css('transform', 'rotate(' + imagePosition + 'deg)');
$('#Nav').css('transform', 'rotate(' + wheelRotation + 'deg)');
wheelPosition = 270;
} else if (wheelPosition === 90 && direction == 90) {
wheelPosition = 315;
} else if (wheelPosition === 135 && direction == 90) {
$('.beer--logos').css('transform', 'rotate(' + imagePosition + 'deg)');
$('#Nav').css('transform', 'rotate(' + wheelRotation + 'deg)');
wheelPosition = 180;
} else if (wheelPosition === 90 && direction == -90) {
wheelPosition = 225;
} else if (wheelPosition === 135 && direction == -90) {
$('.beer--logos').css('transform', 'rotate(' + imagePosition + 'deg)');
$('#Nav').css('transform', 'rotate(' + wheelRotation + 'deg)');
wheelPosition = 0;
} else if (wheelPosition === 180 && direction == 90) {
wheelPosition = 45;
} else if (wheelPosition === 225 && direction == 90) {
$('.beer--logos').css('transform', 'rotate(' + imagePosition + 'deg)');
$('#Nav').css('transform', 'rotate(' + wheelRotation + 'deg)');
wheelPosition = 270;
} else if (wheelPosition === 180 && direction == -90) {
wheelPosition = 315;
} else if (wheelPosition === 225 && direction == -90) {
$('.beer--logos').css('transform', 'rotate(' + imagePosition + 'deg)');
$('#Nav').css('transform', 'rotate(' + wheelRotation + 'deg)');
wheelPosition = 90;
} else if (wheelPosition === 270 && direction == 90) {
wheelPosition = 135;
} else if (wheelPosition === 315 && direction == 90) {
$('.beer--logos').css('transform', 'rotate(' + imagePosition + 'deg)');
$('#Nav').css('transform', 'rotate(' + wheelRotation + 'deg)');
wheelPosition = 0;
} else if (wheelPosition === 270 && direction == -90) {
wheelPosition = 45;
} else if (wheelPosition === 315 && direction == -90) {
$('.beer--logos').css('transform', 'rotate(' + imagePosition + 'deg)');
$('#Nav').css('transform', 'rotate(' + wheelRotation + 'deg)');
wheelPosition = 180;
wheelPosition = 225;
}
}

Expand Down

0 comments on commit e5a2c2d

Please sign in to comment.