src/js/extensions/table/mergedTableRemoveCol.js
function _updateColspan(tableData, startColIndex, endColIndex) {
  tableData.forEach(rowData => {
    util.range(startColIndex, endColIndex + 1).forEach(colIndex => {
      const cellData = rowData [colIndex];

      if (util.isExisty(cellData.colMergeWith)) {
        const merger = rowData [cellData.colMergeWith];

        if (merger.colspan) {
          merger.colspan -= 1;
        }
      } else if (cellData.colspan > 1) {
        const lastMergedCellIndex = colIndex + cellData.colspan - 1;

        cellData.colspan -= (endColIndex - colIndex + 1);

        if (lastMergedCellIndex > endColIndex) {
          rowData [endColIndex + 1] = util.extend({}, cellData);
        }
      }
    });
  });
}
function _updateColspan(tableData, startColIndex, endColIndex) {
  tableData.forEach(rowData => {
    util.range(startColIndex, endColIndex + 1).forEach(colIndex => {
      const cellData = rowData [colIndex];

      if (util.isExisty(cellData.colMergeWith)) {
        const merger = rowData [cellData.colMergeWith];

        if (merger.colspan) {
          merger.colspan -= 1;
        }
      } else if (cellData.colspan > 1) {
        const lastMergedCellIndex = colIndex + cellData.colspan - 1;

        cellData.colspan -= (endColIndex - colIndex + 1);

        if (lastMergedCellIndex > endColIndex) {
          rowData [endColIndex + 1] = util.extend({}, cellData);
        }
      }
    });
  });
}
function _updateColspan ( tableData , startColIndex , endColIndex ) { tableData . forEach ( rowData => { util . range ( startColIndex , endColIndex + 1 ) . forEach ( colIndex => { const cellData = rowData [ colIndex ] ; if ( util . isExisty ( cellData . colMergeWith ) ) { const merger = rowData [ cellData . colMergeWith ] ; if ( merger . colspan ) { merger . colspan -= 1 ; } } else if ( cellData . colspan > 1 ) { const lastMergedCellIndex = colIndex + cellData . colspan - 1 ; cellData . colspan -= ( endColIndex - colIndex + 1 ) ; if ( lastMergedCellIndex > endColIndex ) { rowData [ endColIndex + 1 ] = util . extend ( { } , cellData ) ; } } } ) ; } ) ; }
Update colspan to col merger.
@param {Array.<Array.<object>>} tableData - table data
@param {number} startColIndex - start col index
@param {number} endColIndex - end col index
@private
Update colspan to col merger .