Skip to content

Commit

Permalink
Fix Preview (#1884)
Browse files Browse the repository at this point in the history
  • Loading branch information
championpaddler authored and mariobehling committed Jan 15, 2019
1 parent 0a24170 commit 7ad1723
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/app/components/create-badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ export default Component.extend({
EmberObject.$(window).bind('resize scroll', function(e) {
var card = EmberObject.$(document)[0].getElementsByClassName('six wide column preview');
if (card.length != 0) {
if (e.type === 'scroll' && this.scrollY >= 137 && this.window.innerWidth >= 764 && this.scrollY < 1278) {
if (e.type === 'scroll' && this.scrollY >= 137 && this.window.innerWidth >= 764 && !(EmberObject.$(window).scrollTop() + EmberObject.$(window).height() > (EmberObject.$(document).height() - 100))) {
card[0].style.position = 'fixed';
card[0].style.right = '0';
card[0].style.top = '0';
} else if (e.type === 'scroll' && this.window.innerWidth >= 764 && this.scrollY >= 1278) {
EmberObject.$(document)[0].getElementsByClassName('bgImg ui raised segment')[0].style.height = '600px';
} else if (e.type === 'scroll' && this.window.innerWidth >= 764 && (EmberObject.$(window).scrollTop() + EmberObject.$(window).height() > (EmberObject.$(document).height() - 100))) {
card[0].style.position = 'fixed';
EmberObject.$(document)[0].getElementsByClassName('bgImg ui raised segment')[0].style.height = '100%';
EmberObject.$(document)[0].getElementsByClassName('bgImg ui raised segment')[0].style.height = '530px';
} else {
EmberObject.$(document)[0].getElementsByClassName('bgImg ui raised segment')[0].style.height = '100%';
card[0].style.position = 'inherit';
Expand Down

0 comments on commit 7ad1723

Please sign in to comment.