Refactor JS code for consistent formatting and style

Standardized spacing and object literal formatting across multiple JS files for improved readability and consistency. No functional changes were made. Minor Python formatting adjustment for line length in canvas_node.py.
This commit is contained in:
Dariusz L
2025-06-25 05:51:47 +02:00
parent acdd12b65e
commit 6b44bd9239
5 changed files with 283 additions and 247 deletions

View File

@@ -29,7 +29,7 @@ function openDB() {
console.log("Upgrading IndexedDB...");
const db = event.target.result;
if (!db.objectStoreNames.contains(STORE_NAME)) {
db.createObjectStore(STORE_NAME, { keyPath: 'id' });
db.createObjectStore(STORE_NAME, {keyPath: 'id'});
console.log("Object store created:", STORE_NAME);
}
};
@@ -62,7 +62,7 @@ export async function setCanvasState(id, state) {
return new Promise((resolve, reject) => {
const transaction = db.transaction([STORE_NAME], 'readwrite');
const store = transaction.objectStore(STORE_NAME);
const request = store.put({ id, state });
const request = store.put({id, state});
request.onerror = (event) => {
console.error("DB: Error setting canvas state:", event.target.error);