From 570a6ce1db4d5cbbcbb43606c76160e9040a3e8e Mon Sep 17 00:00:00 2001 From: Jan Henckens Date: Wed, 9 Nov 2016 17:39:48 +0100 Subject: [PATCH] Masonry chrome bug, fixes #9 --- admin/css/wp-splashing-admin.css | 6 ++---- admin/partials/wp-splashing-admin-display.php | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/admin/css/wp-splashing-admin.css b/admin/css/wp-splashing-admin.css index 0130de6..6d9c1a1 100644 --- a/admin/css/wp-splashing-admin.css +++ b/admin/css/wp-splashing-admin.css @@ -2,15 +2,13 @@ * All of the CSS for your admin-specific functionality should be * included in this file. */ - -a.upload { - position: relative; -} img.splashing-thumbnail { padding: 10px; width: 30%; max-width: 300px; position: relative; + margin-right: auto; + margin-left: auto; } #wp-splashing_images .media-toolbar-primary { display: inline-block; diff --git a/admin/partials/wp-splashing-admin-display.php b/admin/partials/wp-splashing-admin-display.php index 7994337..d9365ef 100644 --- a/admin/partials/wp-splashing-admin-display.php +++ b/admin/partials/wp-splashing-admin-display.php @@ -116,10 +116,11 @@ jQuery(document).ready(function() { var $grid = jQuery('#splashing-images').masonry({ itemSelector: '.splashing-thumbnail' - }).masonry('reloadItems'); + }); $grid.imagesLoaded().progress( function() { $grid.masonry('layout'); }); + }); \ No newline at end of file