From 11e3f1faa692f3ca2c305db15a32020740d4d0c7 Mon Sep 17 00:00:00 2001 From: YvetteNikolov Date: Mon, 19 Aug 2024 08:29:28 +0200 Subject: [PATCH] (feat): add comment to js item-to-group connection --- js/limit-item-connections.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/limit-item-connections.js b/js/limit-item-connections.js index 71112ba..7bf1e4f 100644 --- a/js/limit-item-connections.js +++ b/js/limit-item-connections.js @@ -92,6 +92,7 @@ function toggleMetaboxBorder(metaboxWrapper, connectionExists) { wrapper.style.border = connectionExists ? '' : '1px solid red'; } +// Enforces that only one group connection can be made. Not sure why this is necessary, but it was in the original code. function toggleGroupConnectionVisibility(metabox, mainConnectionTableRow) { const createConnectionsElement = document.querySelector(`${metabox} > div.p2p-create-connections`); const connectionExists = document.querySelectorAll(mainConnectionTableRow).length === 1;