Correctly center crop the uploaded image. Fixes #110

This commit is contained in:
Flavio Copes
2015-08-28 16:45:42 +02:00
parent d82bd9a88d
commit ae4939dde4
3 changed files with 29 additions and 1 deletions

View File

@@ -2092,6 +2092,17 @@ body.remodal_active .remodal {
border-left: 0; } border-left: 0; }
.dropzone .dz-preview:hover .dz-insert { .dropzone .dz-preview:hover .dz-insert {
right: inherit; } right: inherit; }
.dropzone .dz-preview.dz-processing .dz-details {
overflow: hidden; }
.dropzone .dz-preview.dz-processing .dz-details img {
position: absolute;
left: 50%;
top: 50%;
height: auto;
width: 100%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%); }
.dropzone .dz-preview .dz-details { .dropzone .dz-preview .dz-details {
width: 150px; width: 150px;
height: 100px; height: 100px;

File diff suppressed because one or more lines are too long

View File

@@ -162,6 +162,23 @@ $error-color: #D55A4E;
right: inherit; right: inherit;
} }
&.dz-processing {
.dz-details {
overflow: hidden;
img {
position: absolute;
left: 50%;
top: 50%;
height: auto;
width: 100%;
-webkit-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
}
}
.dz-details { .dz-details {
width: $preview-width; width: $preview-width;
height: $preview-height; height: $preview-height;