@visactor/vtable
Version:
canvas table width high performance
22 lines (17 loc) • 2.96 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.getCellBorderStrokeWidth = void 0;
const style_1 = require("../../tools/style");
function getCellBorderStrokeWidth(col, row, cellTheme, table) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
let strokeArrayWidth = null !== (_b = null === (_a = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _a ? void 0 : _a.strokeArrayWidth) && void 0 !== _b ? _b : void 0;
return table.theme.cellInnerBorder || !(0, style_1.isValidStyle)(table.theme.frameStyle.borderLineWidth) || (0,
style_1.isZeroStyle)(table.theme.frameStyle.borderLineWidth) || (0 === col && (strokeArrayWidth = null != strokeArrayWidth ? strokeArrayWidth : [ null === (_c = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _c ? void 0 : _c.lineWidth, null === (_d = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _d ? void 0 : _d.lineWidth, null === (_e = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _e ? void 0 : _e.lineWidth, null === (_f = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _f ? void 0 : _f.lineWidth ],
strokeArrayWidth[3] = 0), col === table.colCount - 1 && (strokeArrayWidth = null != strokeArrayWidth ? strokeArrayWidth : [ null === (_g = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _g ? void 0 : _g.lineWidth, null === (_h = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _h ? void 0 : _h.lineWidth, null === (_j = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _j ? void 0 : _j.lineWidth, null === (_k = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _k ? void 0 : _k.lineWidth ],
strokeArrayWidth[1] = 0), 0 === row && (strokeArrayWidth = null != strokeArrayWidth ? strokeArrayWidth : [ null === (_l = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _l ? void 0 : _l.lineWidth, null === (_m = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _m ? void 0 : _m.lineWidth, null === (_o = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _o ? void 0 : _o.lineWidth, null === (_p = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _p ? void 0 : _p.lineWidth ],
strokeArrayWidth[0] = 0), row === table.rowCount - 1 && (strokeArrayWidth = null != strokeArrayWidth ? strokeArrayWidth : [ null === (_q = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _q ? void 0 : _q.lineWidth, null === (_r = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _r ? void 0 : _r.lineWidth, null === (_s = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _s ? void 0 : _s.lineWidth, null === (_t = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _t ? void 0 : _t.lineWidth ],
strokeArrayWidth[2] = 0)), strokeArrayWidth;
}
exports.getCellBorderStrokeWidth = getCellBorderStrokeWidth;
//# sourceMappingURL=cell-border-stroke-width.js.map