From cb1f2a87bd8694b8dfdbe8e0c14fb7ee0da841f3 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 15 Sep 2025 11:28:38 +0800 Subject: refactor: lightbox ID generation and shadow management Replaces the async SHA-256 based unique ID generation with a synchronous hashCode method in Utility. Refactors LightBox to manage Shadow instances in a local cache instead of querying the DOM, and removes the static find method from Shadow. Also extracts image link wrapping logic into a helper method for clarity. --- src/shadow.js | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/shadow.js') diff --git a/src/shadow.js b/src/shadow.js index 84eac48..6051cd9 100644 --- a/src/shadow.js +++ b/src/shadow.js @@ -39,11 +39,6 @@ export default class Shadow { }); } - static find(image) { - const shadowId = `libo-shadow-${image.id}`; - return document.getElementById(shadowId); - } - calculateStartsAndFinals() { // get starting state this.startingState = { -- cgit v1.2.3