diff --git a/lib/zin/wg/think3c/js/v1.js b/lib/zin/wg/think3c/js/v1.js index 110e12e75c..c2e89011ad 100644 --- a/lib/zin/wg/think3c/js/v1.js +++ b/lib/zin/wg/think3c/js/v1.js @@ -215,6 +215,25 @@ function isSameLine(currentItem, nextItem, offset) return currentItem[1] == nextItem[1] || Math.abs(currentItem[1] - nextItem[1]) < offset; } +function groupPositions(data, offset) +{ + const groupedData = new Map(); + + /* 分组数据 */ + /* Group data. */ + data.forEach(item => { + const key = item[2]; + if (!groupedData.has(key)) groupedData.set(key, []); + groupedData.get(key).push(item); + }); + + /* 合并临近的行 */ + /* Merge adjacent rows. */ + const mergedGroups = []; + + return mergedGroups; +} + /** * 使用偏移量计算位置。 * Calculate positions with offset.