UNPKG

@antv/s2

Version:

effective spreadsheet render core lib

28 lines 870 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAllChildCells = void 0; const g_1 = require("@antv/g"); const lodash_1 = require("lodash"); const getAllChildCells = (children = [], cellType) => { if ((0, lodash_1.isEmpty)(children)) { return []; } const cells = []; children.forEach((child) => { if (child instanceof cellType) { cells.push(child); } // panel group has child group if (child instanceof g_1.Group) { const groupChildren = child.children; groupChildren.forEach((item) => { if (item instanceof cellType) { cells.push(item); } }); } }); return cells; }; exports.getAllChildCells = getAllChildCells; //# sourceMappingURL=get-all-child-cells.js.map