eli-video-interview 1.2.42-alpha.29 → 1.2.42-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -109,9 +109,10 @@ var drawTop = function (layout, ctx) {
|
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
};
|
|
112
|
+
var truncateString = function (str) { return (str.length > 7 ? "".concat(str.slice(0, 6), "...") : str); };
|
|
112
113
|
var drawLable = function (lable, x, y, ctx) {
|
|
113
114
|
ctx.fillStyle = 'rgba(66, 66, 66, 0.86)';
|
|
114
|
-
ctx.fillText(lable, x, y + 5);
|
|
115
|
+
ctx.fillText(truncateString(lable), x, y + 5);
|
|
115
116
|
};
|
|
116
117
|
function drawVerticalDashedLine(ctx, x, startY, endY, dashLength, gapLength) {
|
|
117
118
|
if (dashLength === void 0) { dashLength = 2; }
|
|
@@ -183,7 +184,7 @@ var draw = function (layout, dimensions, pathRef, ctx) {
|
|
|
183
184
|
ctx.fillStyle = config.backgroundColor;
|
|
184
185
|
drawRoundedRect(x, y, MAX_WIDTH, MAX_HEIGHT, borderRadius, true, false, ctx);
|
|
185
186
|
var endPointY = 65 + layout.itemSpacing * i;
|
|
186
|
-
drawLable(v.name,
|
|
187
|
+
drawLable(v.name, 0, endPointY, ctx);
|
|
187
188
|
var score = (_a = v.score) !== null && _a !== void 0 ? _a : (v.score < 4 ? 4 : v.score);
|
|
188
189
|
drawScore(layout, ctx, config, {
|
|
189
190
|
x: layout.leftLableWidth,
|
|
@@ -218,7 +219,7 @@ var Graph = function (_a) {
|
|
|
218
219
|
useEffect(function () {
|
|
219
220
|
if (ctx) {
|
|
220
221
|
var layout = {
|
|
221
|
-
leftLableWidth:
|
|
222
|
+
leftLableWidth: 140,
|
|
222
223
|
topLableHeight: 40,
|
|
223
224
|
itemSpacing: 40,
|
|
224
225
|
height: height,
|
|
@@ -112,9 +112,10 @@ var drawTop = function (layout, ctx) {
|
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
114
|
};
|
|
115
|
+
var truncateString = function (str) { return (str.length > 7 ? "".concat(str.slice(0, 6), "...") : str); };
|
|
115
116
|
var drawLable = function (lable, x, y, ctx) {
|
|
116
117
|
ctx.fillStyle = 'rgba(66, 66, 66, 0.86)';
|
|
117
|
-
ctx.fillText(lable, x, y + 5);
|
|
118
|
+
ctx.fillText(truncateString(lable), x, y + 5);
|
|
118
119
|
};
|
|
119
120
|
function drawVerticalDashedLine(ctx, x, startY, endY, dashLength, gapLength) {
|
|
120
121
|
if (dashLength === void 0) { dashLength = 2; }
|
|
@@ -187,7 +188,7 @@ var draw = function (layout, dimensions, pathRef, ctx) {
|
|
|
187
188
|
ctx.fillStyle = config.backgroundColor;
|
|
188
189
|
drawRoundedRect(x, y, MAX_WIDTH, MAX_HEIGHT, borderRadius, true, false, ctx);
|
|
189
190
|
var endPointY = 65 + layout.itemSpacing * i;
|
|
190
|
-
drawLable(v.name,
|
|
191
|
+
drawLable(v.name, 0, endPointY, ctx);
|
|
191
192
|
var score = (_a = v.score) !== null && _a !== void 0 ? _a : (v.score < 4 ? 4 : v.score);
|
|
192
193
|
drawScore(layout, ctx, config, {
|
|
193
194
|
x: layout.leftLableWidth,
|
|
@@ -222,7 +223,7 @@ var Graph = function (_a) {
|
|
|
222
223
|
(0, react_1.useEffect)(function () {
|
|
223
224
|
if (ctx) {
|
|
224
225
|
var layout = {
|
|
225
|
-
leftLableWidth:
|
|
226
|
+
leftLableWidth: 140,
|
|
226
227
|
topLableHeight: 40,
|
|
227
228
|
itemSpacing: 40,
|
|
228
229
|
height: height,
|