@visactor/vtable
Version:
canvas table width high performance
29 lines (24 loc) • 1.23 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.createCornerCell = void 0;
const frame_border_1 = require("./frame-border"), padding_1 = require("../utils/padding");
function createCornerCell(cellGroup, frameTheme) {
const {bgColor: bgColor, borderColor: borderColor, borderLineWidth: borderLineWidth, borderLineDash: borderLineDash} = frameTheme, rectAttributes = {
x: 0,
y: 0,
width: 0,
height: 0,
visible: !1,
pickable: !0,
fill: bgColor
};
return rectAttributes.stroke = (0, frame_border_1.getStroke)(borderColor, void 0),
rectAttributes.lineWidth = borderLineWidth, borderLineDash && (rectAttributes.lineDash = borderLineDash),
rectAttributes.lineCap = "butt", Array.isArray(borderColor) && (rectAttributes.strokeArrayColor = (0,
padding_1.getQuadProps)(borderColor)), Array.isArray(borderLineWidth) && (rectAttributes.strokeArrayWidth = (0,
padding_1.getQuadProps)(borderLineWidth), rectAttributes.lineWidth = 1), cellGroup.setAttributes(rectAttributes),
cellGroup.role = "corner-frozen", cellGroup;
}
exports.createCornerCell = createCornerCell;
//# sourceMappingURL=corner-cell.js.map