@visactor/vtable
Version:
canvas table width high performance
24 lines (19 loc) • 1.54 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.Text = void 0;
const vrender_1 = require("./../../vrender"), vutils_1 = require("@visactor/vutils");
class Text extends vrender_1.Text {
constructor(options) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
options.textBaseline || (options.textBaseline = "top");
const isPaddingNumber = (0, vutils_1.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, options.fill = null !== (_l = options.fill) && void 0 !== _l ? _l : "#000",
super(options);
}
getSize(table) {
this.AABBBounds.width();
}
}
exports.Text = Text;
//# sourceMappingURL=text.js.map