feat: freezing the list in the backgroud while previewing a file (#3004)
This commit is contained in:
@@ -383,17 +383,22 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
req: function () {
|
||||
// Reset the show value
|
||||
this.showLimit = 50;
|
||||
if (window.sessionStorage.getItem('listFrozen') !=="true"){
|
||||
// Reset the show value
|
||||
this.showLimit = 50;
|
||||
|
||||
// Ensures that the listing is displayed
|
||||
Vue.nextTick(() => {
|
||||
// How much every listing item affects the window height
|
||||
this.setItemWeight();
|
||||
// Ensures that the listing is displayed
|
||||
Vue.nextTick(() => {
|
||||
// How much every listing item affects the window height
|
||||
this.setItemWeight();
|
||||
|
||||
// Fill and fit the window with listing items
|
||||
this.fillWindow(true);
|
||||
});
|
||||
// Fill and fit the window with listing items
|
||||
this.fillWindow(true);
|
||||
});
|
||||
}
|
||||
if (this.req.isDir) {
|
||||
window.sessionStorage.setItem('listFrozen', "false");
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted: function () {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<div
|
||||
id="previewer"
|
||||
@touchmove.prevent.stop
|
||||
@wheel.prevent.stop
|
||||
@mousemove="toggleNavigation"
|
||||
@touchstart="toggleNavigation"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user