source: imaps-frontend/node_modules/html2canvas/dist/lib/dom/text-container.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[79a0317]1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.TextContainer = void 0;
4var text_1 = require("../css/layout/text");
5var TextContainer = /** @class */ (function () {
6 function TextContainer(context, node, styles) {
7 this.text = transform(node.data, styles.textTransform);
8 this.textBounds = text_1.parseTextBounds(context, this.text, styles, node);
9 }
10 return TextContainer;
11}());
12exports.TextContainer = TextContainer;
13var transform = function (text, transform) {
14 switch (transform) {
15 case 1 /* LOWERCASE */:
16 return text.toLowerCase();
17 case 3 /* CAPITALIZE */:
18 return text.replace(CAPITALIZE, capitalize);
19 case 2 /* UPPERCASE */:
20 return text.toUpperCase();
21 default:
22 return text;
23 }
24};
25var CAPITALIZE = /(^|\s|:|-|\(|\))([a-z])/g;
26var capitalize = function (m, p1, p2) {
27 if (m.length > 0) {
28 return p1 + p2.toUpperCase();
29 }
30 return m;
31};
32//# sourceMappingURL=text-container.js.map
Note: See TracBrowser for help on using the repository browser.