mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-05 01:13:40 -04:00
Fixes problems with misalgined image previews.
This commit is contained in:
parent
864687aedf
commit
2282a0ba71
3 changed files with 16 additions and 22 deletions
|
@ -129,9 +129,15 @@ modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/resource',
|
|||
clearTimeout(spinnerTimeout);
|
||||
$container.spin(false);
|
||||
|
||||
$img.attr('src', src).show();
|
||||
// $img.hide().attr('src', src).fadeIn(100);
|
||||
$img.fadeOut(100, function () {
|
||||
|
||||
adjustSize();
|
||||
$img.attr('src', src).fadeIn(200);
|
||||
setTimeout(adjustSize, 1);
|
||||
});
|
||||
|
||||
// adjustSize();
|
||||
// setTimeout(adjustSize, 1);
|
||||
|
||||
$('#preview-bar-label').text(currentEntries[currentIdx].label);
|
||||
$('#preview-bar-percent').text('' + (100 * $img.width() / width).toFixed(0) + '%');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue