@visactor/vtable
Version:
canvas table width high performance
23 lines (20 loc) • 1.03 kB
JavaScript
import { getStroke } from "./frame-border";
import { getQuadProps } from "../utils/padding";
export 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 = getStroke(borderColor, void 0), rectAttributes.lineWidth = borderLineWidth,
borderLineDash && (rectAttributes.lineDash = borderLineDash), rectAttributes.lineCap = "butt",
Array.isArray(borderColor) && (rectAttributes.strokeArrayColor = getQuadProps(borderColor)),
Array.isArray(borderLineWidth) && (rectAttributes.strokeArrayWidth = getQuadProps(borderLineWidth),
rectAttributes.lineWidth = 1), cellGroup.setAttributes(rectAttributes), cellGroup.role = "corner-frozen",
cellGroup;
}
//# sourceMappingURL=corner-cell.js.map