Skip to content

Commit

Permalink
fix card aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrothman committed Jul 31, 2017
1 parent e5db6d6 commit 7de5f42
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 5 additions & 7 deletions www/js/directives/VatomCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ angular.module("omniDirectives").directive('vatomCard', function ($compile) {
currentElement = el.element;

window.addEventListener("resize", function (e) {
var pageHeight = e.target.outerHeight;

var height = 0;
var width = 0;

var scaleUsing = window.innerWidth / window.innerHeight;
var scaleUsing = window.innerWidth / (window.innerHeight - 94);

if (scaleUsing > 0.57) {
height = window.innerHeight;
if (scaleUsing > 0.62) {
height = window.innerHeight - 94;
width = height * (10 / 16);
}
else {
Expand All @@ -38,8 +36,8 @@ angular.module("omniDirectives").directive('vatomCard', function ($compile) {
var toPercent = ratio * 100;
}

currentElement.parentElement.style.height = height-20 + "px";
currentElement.parentElement.style.width = width-20 + "px";
currentElement.parentElement.style.height = (height - 20) + "px";
currentElement.parentElement.style.width = (width - 20) + "px";
}, true);
});
}
Expand Down
4 changes: 2 additions & 2 deletions www/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1728,8 +1728,8 @@ i.icon-l{
}

.object-card {
width: 545px;
height: 872px;
width: 459.375px;
height: 735px;
border-radius: 10px;
border: 1px solid rgb(76, 76, 76);
position: fixed;
Expand Down
2 changes: 1 addition & 1 deletion www/views/wallet/partials/assets_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div vatom-fullscreen vatom-def={{selectedObject.objectDef}}></div>
</div>

<div class="object-card" ng-style="{'display': isModalOpen && isCardAvailable ? 'auto' : 'none', 'left': '10px', 'bottom': isModalOpen ? (isCardOpen ? '10px' : '-calc(100% - 75px)') : 'translateY(930px)'}">
<div class="object-card" ng-style="{'display': isModalOpen && isCardAvailable ? 'auto' : 'none', 'left': '10px', 'bottom': isModalOpen ? (isCardOpen ? '75px' : '-calc(100% - 75px)') : 'translateY(930px)'}">
<div vatom-card vatom-def={{selectedObject.objectDef}}></div>
</div>

Expand Down

0 comments on commit 7de5f42

Please sign in to comment.