improved grid display without masonry
This commit is contained in:
@@ -1537,13 +1537,20 @@
|
||||
function checkGridBlockHeight(){
|
||||
console.log('checkGridBlockHeight');
|
||||
var $r_h = _$row.height();
|
||||
var $this;
|
||||
// console.log($r_h);
|
||||
$('.grid .col', _$row).each(function(i,e){
|
||||
// console.log($(this).height(), $(this).innerHeight(), $(this).outerHeight());
|
||||
if($(this).height() > $r_h){
|
||||
$(this).height($r_h);
|
||||
$this = $(this);
|
||||
if(!$this.is('[init-height]')){
|
||||
$this.attr('init-height', $this.outerHeight())
|
||||
}
|
||||
// $(this).innerHeight(Math.min($(this).innerHeight(), _$row.height()));
|
||||
// console.log($(this).height(), $(this).innerHeight(), $(this).outerHeight());
|
||||
// if($this.height() > $r_h){
|
||||
// $this.height($r_h);
|
||||
// }else{
|
||||
// $this.height('auto');
|
||||
// }
|
||||
$this.height(Math.min($this.attr('init-height'), _$row.height()));
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1558,6 +1565,8 @@
|
||||
console.log(pos.top, $this.height(), pos.top+$this.height(), $r_h, $this);
|
||||
if(pos.top+$this.height() <= $r_h){
|
||||
$this.removeClass('offfield');
|
||||
}else{
|
||||
$this.addClass('offfield');
|
||||
}
|
||||
// });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user