mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 04:24:45 -04:00
Fix preview label issue.
This commit is contained in:
parent
b33599f4f2
commit
86466f072b
3 changed files with 4 additions and 2 deletions
|
@ -111,10 +111,10 @@ modulejs.define('ext/preview-img', ['_', '$', 'core/event', 'core/server', 'core
|
|||
|
||||
currentItems = items;
|
||||
currentIdx = idx;
|
||||
onIdxChange(0);
|
||||
preview.setOnIndexChange(onIdxChange);
|
||||
preview.setOnAdjustSize(onAdjustSize);
|
||||
preview.enter();
|
||||
onIdxChange(0);
|
||||
}
|
||||
|
||||
function initItem(item) {
|
||||
|
|
|
@ -108,10 +108,10 @@ modulejs.define('ext/preview-txt', ['_', '$', 'marked', 'prism', 'core/event', '
|
|||
currentItems = items;
|
||||
currentIdx = idx;
|
||||
currentItem = items[idx];
|
||||
onIdxChange(0);
|
||||
preview.setOnIndexChange(onIdxChange);
|
||||
preview.setOnAdjustSize(onAdjustSize);
|
||||
preview.enter();
|
||||
onIdxChange(0);
|
||||
}
|
||||
|
||||
function initItem(item) {
|
||||
|
|
|
@ -65,6 +65,8 @@ modulejs.define('ext/preview', ['_', '$', 'core/resource', 'core/settings', 'cor
|
|||
|
||||
function onEnter() {
|
||||
|
||||
setLabels([]);
|
||||
$('#pv-content').empty();
|
||||
$('#pv-overlay').stop(true, true).fadeIn(200);
|
||||
$window.on('keydown', onKeydown);
|
||||
adjustSize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue