Spaces:
Sleeping
Sleeping
Update static/js/editor.js
Browse files- static/js/editor.js +18 -23
static/js/editor.js
CHANGED
|
@@ -511,35 +511,30 @@ function updateOverlayContent(currentTime) {
|
|
| 511 |
let textColor = '#ffffff';
|
| 512 |
if (w.color) textColor = w.color;
|
| 513 |
|
| 514 |
-
|
| 515 |
-
let baseStyle = `display: inline-block;
|
| 516 |
-
font-family: inherit;
|
| 517 |
-
padding: 2px 4px; /* پدینگ فیزیکی حداقلی برای جلوگیری از ناپدید شدن */
|
| 518 |
-
margin: 2px;
|
| 519 |
-
position: relative;`;
|
| 520 |
|
| 521 |
if(isActive) {
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
| 529 |
-
|
| 530 |
-
|
| 531 |
-
transform: scale(1.05);
|
| 532 |
-
z-index: 100;">${w.word}</span>`;
|
| 533 |
} else {
|
| 534 |
-
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
|
| 538 |
-
|
|
|
|
|
|
|
| 539 |
}
|
| 540 |
|
| 541 |
if ((i + 1) % 5 === 0 && i !== seg.words.length - 1) {
|
| 542 |
-
html += "<br>";
|
| 543 |
}
|
| 544 |
});
|
| 545 |
tEl.innerHTML = html;
|
|
|
|
| 511 |
let textColor = '#ffffff';
|
| 512 |
if (w.color) textColor = w.color;
|
| 513 |
|
| 514 |
+
let baseStyle = `display: inline-block; line-height: 1.4; border-radius: ${state.st.radius}px; font-family: inherit;`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 515 |
|
| 516 |
if(isActive) {
|
| 517 |
+
html += `<span style="${baseStyle}
|
| 518 |
+
background-color: ${boxColor};
|
| 519 |
+
color: ${textColor} !important;
|
| 520 |
+
box-shadow: 0 0 0 ${state.st.paddingY}px ${boxColor};
|
| 521 |
+
margin: 0 ${state.st.paddingX}px;
|
| 522 |
+
padding: 2px 0;
|
| 523 |
+
position: relative;
|
| 524 |
+
z-index: 100;
|
| 525 |
+
transform: scale(1.1);">${w.word}</span> `;
|
|
|
|
|
|
|
| 526 |
} else {
|
| 527 |
+
html += `<span style="${baseStyle}
|
| 528 |
+
color: ${textColor} !important;
|
| 529 |
+
text-shadow: none;
|
| 530 |
+
margin: 0 ${state.st.paddingX}px;
|
| 531 |
+
padding: 2px 0;
|
| 532 |
+
position: relative;
|
| 533 |
+
z-index: 1;">${w.word}</span> `;
|
| 534 |
}
|
| 535 |
|
| 536 |
if ((i + 1) % 5 === 0 && i !== seg.words.length - 1) {
|
| 537 |
+
html += "<br><br>";
|
| 538 |
}
|
| 539 |
});
|
| 540 |
tEl.innerHTML = html;
|