@visactor/vtable
Version:
canvas table width high performance
13 lines (10 loc) • 1.2 kB
JavaScript
import { Group as VGroup } from "./../../vrender";
import { isArray } from "@visactor/vutils";
export class Group extends VGroup {
constructor(options) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
const isPaddingNumber = isArray(options.boundsPadding), padding = [ null !== (_b = null !== (_a = options.marginTop) && void 0 !== _a ? _a : isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) && void 0 !== _b ? _b : 0, null !== (_d = null !== (_c = options.marginRight) && void 0 !== _c ? _c : isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) && void 0 !== _d ? _d : 0, null !== (_g = null !== (_e = options.marginBottom) && void 0 !== _e ? _e : isPaddingNumber ? null !== (_f = options.boundsPadding[2]) && void 0 !== _f ? _f : options.boundsPadding[0] : options.boundsPadding) && void 0 !== _g ? _g : 0, null !== (_k = null !== (_h = options.marginLeft) && void 0 !== _h ? _h : isPaddingNumber ? null !== (_j = options.boundsPadding[3]) && void 0 !== _j ? _j : options.boundsPadding[1] : options.boundsPadding) && void 0 !== _k ? _k : 0 ];
options.boundsPadding = padding, super(options);
}
}
//# sourceMappingURL=group.js.map