fix preview on custom category when sidebar is on the right
This commit is contained in:
@@ -227,7 +227,7 @@ function createContextMenu(event, subMenus,settingsData) {
|
||||
}
|
||||
menuOptions.appendChild(li);
|
||||
});
|
||||
console.log("lll")
|
||||
|
||||
// Show context menu
|
||||
sbcontextMenu.style.display = 'block';
|
||||
sbcontextMenu.style.top = event.clientY + 'px';
|
||||
|
||||
@@ -360,8 +360,11 @@ async function renderList(elementID) {
|
||||
previewDivTop = (itemPosition.top + this.offsetHeight) - previewDiv.offsetHeight;
|
||||
}
|
||||
|
||||
const previewDivLeft = itemPosition.left + this.offsetWidth + correction_offset;
|
||||
|
||||
let previewDivLeft = itemPosition.left + this.offsetWidth + correction_offset;
|
||||
if (sbPosition == "right") {
|
||||
|
||||
previewDivLeft = -itemPosition.left + this.offsetWidth + correction_offset;
|
||||
}
|
||||
previewDiv.style.top = `${previewDivTop}px`;
|
||||
previewDiv.style.left = `${previewDivLeft}px`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user