UNPKG

@visactor/vrender-components

Version:

components library for dp visualization

20 lines (17 loc) 684 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.isTextOverflow = void 0; const isTextOverflow = (componentBoundsLike, textBounds, layout, isHorizontal) => { if (!textBounds) return !1; if (isHorizontal) { if ("start" === layout) { if (textBounds.x1 < componentBoundsLike.x1) return !0; } else if (textBounds.x2 > componentBoundsLike.x2) return !0; } else if ("start" === layout) { if (textBounds.y1 < componentBoundsLike.y1) return !0; } else if (textBounds.y2 > componentBoundsLike.y2) return !0; return !1; }; exports.isTextOverflow = isTextOverflow; //# sourceMappingURL=utils.js.map