tById("spanSelect" + i);
      let spanInput = document.getElementById("spanSelect" + i + "Input");

      gridSpanContent.push({
        nodeName: currentSelection.content[i].nodeName,
        nodeId: currentSelection.content[i].nodeId,
        span: toNumber(spanInput.value, 1),
        maxSpan: spanSelect.value == "All"
      });
    }

    updateScrollingState();

    let commonData = {
      marginLeft: toNumber(gridMarginLeft.value, 0),
      marginRight: toNumber(gridMarginRight.value, 0),
      marg