mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add early return for movingDivs click handler
This commit is contained in:
@@ -26,9 +26,11 @@ let paginationVisiblePages = 10;
|
|||||||
let paginationMaxLinesPerPage = 2;
|
let paginationMaxLinesPerPage = 2;
|
||||||
let galleryMaxRows = 3;
|
let galleryMaxRows = 3;
|
||||||
|
|
||||||
|
// Remove all draggables associated with the gallery
|
||||||
$('#movingDivs').on('click', '.dragClose', function () {
|
$('#movingDivs').on('click', '.dragClose', function () {
|
||||||
const relatedId = $(this).data('related-id'); // Get the ID of the related draggable
|
const relatedId = $(this).data('related-id');
|
||||||
$(`#movingDivs > .draggable[id="${relatedId}"]`).remove(); // Remove the associated draggable
|
if (!relatedId) return;
|
||||||
|
$(`#movingDivs > .draggable[id="${relatedId}"]`).remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
const CUSTOM_GALLERY_REMOVED_EVENT = 'galleryRemoved';
|
const CUSTOM_GALLERY_REMOVED_EVENT = 'galleryRemoved';
|
||||||
|
Reference in New Issue
Block a user