mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 22:45:14 -04:00
Updates preview styles.
This commit is contained in:
parent
61ae46386e
commit
a8a6871ebd
6 changed files with 42 additions and 28 deletions
|
@ -76,6 +76,16 @@ modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/resource',
|
|||
width: rect.width / 2,
|
||||
height: rect.height
|
||||
});
|
||||
|
||||
if (isFullscreen) {
|
||||
$('#pv-img-overlay').addClass('fullscreen');
|
||||
$('#pv-img-bar-fullscreen').find('img').attr('src', resource.image('preview/no-fullscreen'));
|
||||
$('#pv-img-bottombar').fadeOut(400);
|
||||
} else {
|
||||
$('#pv-img-overlay').removeClass('fullscreen');
|
||||
$('#pv-img-bar-fullscreen').find('img').attr('src', resource.image('preview/fullscreen'));
|
||||
$('#pv-img-bottombar').fadeIn(200);
|
||||
}
|
||||
},
|
||||
|
||||
preloadImg = function (src, callback) {
|
||||
|
@ -174,14 +184,6 @@ modulejs.define('ext/preview-img', ['_', '$', 'core/settings', 'core/resource',
|
|||
store.put(storekey, isFullscreen);
|
||||
|
||||
adjustSize();
|
||||
|
||||
if (isFullscreen) {
|
||||
$('#pv-img-bar-fullscreen').find('img').attr('src', resource.image('preview/no-fullscreen'));
|
||||
$('#pv-img-bottombar').fadeOut(400);
|
||||
} else {
|
||||
$('#pv-img-bar-fullscreen').find('img').attr('src', resource.image('preview/fullscreen'));
|
||||
$('#pv-img-bottombar').fadeIn(200);
|
||||
}
|
||||
},
|
||||
|
||||
onKeydown = function (event) {
|
||||
|
|
|
@ -200,9 +200,9 @@ modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/resource',
|
|||
|
||||
if (key === 27) { // esc
|
||||
onExit();
|
||||
} else if (key === 37) { // left
|
||||
} else if (key === 8 || key === 37 || key === 40) { // backspace, left, down
|
||||
onPrevious();
|
||||
} else if (key === 39) { // right
|
||||
} else if (key === 13 || key === 32 || key === 38 || key === 39) { // enter, space, up, right
|
||||
onNext();
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue