1
0
mirror of https://github.com/ONLYOFFICE/sdkjs.git synced 2025-04-18 14:24:11 +03:00
Fix calculation of the first line indentation
This commit is contained in:
Ilya Kirillov 2025-03-12 19:37:06 +03:00
parent aac6c96d65
commit 872e7fb1e9
2 changed files with 3 additions and 3 deletions

View File

@ -278,7 +278,7 @@ $(function () {
test([
["", "VeryLongLongLongLongLongLongLongWord\r\n"],
], [
[[L_FIELD + leftInd, imageX0], [imageX1 + leftInd + firstLine, PAGE_W - R_FIELD]]
[[L_FIELD + firstLine + leftInd, imageX0], [imageX1 + leftInd + firstLine, PAGE_W - R_FIELD]]
]);
firstLine = 0;
@ -286,7 +286,7 @@ $(function () {
test([
["", "VeryLongLongLongLongLongLongLongWord\r\n"],
], [
[[L_FIELD + leftInd, imageX0], [imageX1, PAGE_W - R_FIELD]]
[[L_FIELD + firstLine + leftInd, imageX0], [imageX1, PAGE_W - R_FIELD]]
]);
// Check the indentation when the first range is empty

View File

@ -2204,7 +2204,7 @@ Paragraph.prototype.private_RecalculateRange = function(CurRange, CurL
if (PRS.getCompatibilityMode() >= AscCommon.document_compatibility_mode_Word15)
shift = Math.max(paraPr.Ind.FirstLine, 0);
else
shift = paraPr.Ind.FirstLine < 0.001 ? paraPr.Ind.Left + paraPr.Ind.FirstLine : paraPr.Ind.FirstLine;
shift = paraPr.Ind.FirstLine < -AscWord.EPSILON ? paraPr.Ind.Left + paraPr.Ind.FirstLine : paraPr.Ind.FirstLine;
if (paraPr.Bidi)
Range.XEnd -= shift;