UNPKG

427 BJavaScriptView Raw
1import { isArray } from 'util';
2/**
3 * @ignore
4 * 从图形数据中获取 shape 类型
5 * @param shapeCfg
6 * @param defaultShapeType
7 * @returns
8 */
9export function getShapeType(shapeCfg, defaultShapeType) {
10 var shapeType = defaultShapeType;
11 if (shapeCfg.shape) {
12 shapeType = isArray(shapeCfg.shape) ? shapeCfg.shape[0] : shapeCfg.shape;
13 }
14 return shapeType;
15}
16//# sourceMappingURL=get-shape-type.js.map
\No newline at end of file