fixed masonry for productions
This commit is contained in:
@@ -684,7 +684,8 @@
|
|||||||
$('<div>')
|
$('<div>')
|
||||||
.addClass('block random-player')
|
.addClass('block random-player')
|
||||||
.append(this.$btn)
|
.append(this.$btn)
|
||||||
.insertAfter('#block-userlogin, #block-studiolinkblock');
|
// .insertAfter('#block-userlogin, #block-studiolinkblock');
|
||||||
|
.prependTo('.region-footer-right');
|
||||||
|
|
||||||
// events
|
// events
|
||||||
this.$btn.on('click', this.toggleActive.bind(this));
|
this.$btn.on('click', this.toggleActive.bind(this));
|
||||||
@@ -1016,14 +1017,20 @@
|
|||||||
horizontalOrder: true,
|
horizontalOrder: true,
|
||||||
containerStyle: null,
|
containerStyle: null,
|
||||||
// disable initial layout
|
// disable initial layout
|
||||||
initLayout: false,
|
// initLayout: false,
|
||||||
});
|
});
|
||||||
// bind event
|
// bind event
|
||||||
// $grid.masonry( 'on', 'layoutComplete', function() {
|
// $grid.masonry( 'on', 'layoutComplete', function() {
|
||||||
// console.log('layout is complete');
|
// console.log('layout is complete');
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
// layout Masonry after each image loads
|
||||||
|
$grid.imagesLoaded().progress( function() {
|
||||||
|
$grid.masonry('layout');
|
||||||
|
});
|
||||||
|
|
||||||
$grid.imagesLoaded(function(){
|
$grid.imagesLoaded(function(){
|
||||||
$grid.masonry();
|
$grid.masonry('layout');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -684,7 +684,8 @@
|
|||||||
$('<div>')
|
$('<div>')
|
||||||
.addClass('block random-player')
|
.addClass('block random-player')
|
||||||
.append(this.$btn)
|
.append(this.$btn)
|
||||||
.insertAfter('#block-userlogin, #block-studiolinkblock');
|
// .insertAfter('#block-userlogin, #block-studiolinkblock');
|
||||||
|
.prependTo('.region-footer-right');
|
||||||
|
|
||||||
// events
|
// events
|
||||||
this.$btn.on('click', this.toggleActive.bind(this));
|
this.$btn.on('click', this.toggleActive.bind(this));
|
||||||
@@ -1016,14 +1017,20 @@
|
|||||||
horizontalOrder: true,
|
horizontalOrder: true,
|
||||||
containerStyle: null,
|
containerStyle: null,
|
||||||
// disable initial layout
|
// disable initial layout
|
||||||
initLayout: false,
|
// initLayout: false,
|
||||||
});
|
});
|
||||||
// bind event
|
// bind event
|
||||||
// $grid.masonry( 'on', 'layoutComplete', function() {
|
// $grid.masonry( 'on', 'layoutComplete', function() {
|
||||||
// console.log('layout is complete');
|
// console.log('layout is complete');
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
// layout Masonry after each image loads
|
||||||
|
$grid.imagesLoaded().progress( function() {
|
||||||
|
$grid.masonry('layout');
|
||||||
|
});
|
||||||
|
|
||||||
$grid.imagesLoaded(function(){
|
$grid.imagesLoaded(function(){
|
||||||
$grid.masonry();
|
$grid.masonry('layout');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user