fix side panel mod being stuck outside the screen

This commit is contained in:
CloudHill 2020-12-03 19:00:36 +07:00
parent 4807cfd339
commit c767449bbf

View File

@ -76,6 +76,7 @@ module.exports = {
const attempt_interval = setInterval(enhance, 500); const attempt_interval = setInterval(enhance, 500);
function enhance() { function enhance() {
if (!store().width) store().width = 220;
let curPanel = {}; let curPanel = {};
const frame = document.querySelector('.notion-frame'); const frame = document.querySelector('.notion-frame');
@ -143,8 +144,8 @@ module.exports = {
}); });
// Restore lock state // Restore lock state
if (store().locked === 'true') lockPanel(); if (store().locked === 'false') unlockPanel(false);
else unlockPanel(false); else lockPanel();
enableResize(); enableResize();