Fix build for IE11

This commit is contained in:
Nikita Khromov
2026-02-19 16:38:41 +07:00
parent c73eb49e08
commit c412c94e53
4 changed files with 29 additions and 22 deletions

View File

@ -3593,7 +3593,10 @@
curves.forEach(function (curve) {
const v = curve.getValues();
const [o0, o1, o2, o3] = [v[1], v[3], v[5], v[7]];
const o0 = v[1];
const o1 = v[3];
const o2 = v[5];
const o3 = v[7];
if (y >= Math.min(o0, o1, o2, o3) && y <= Math.max(o0, o1, o2, o3)) {
const monoCurves = Curve.getMonoCurves(v);

View File

@ -6533,11 +6533,11 @@ var CPresentation = CPresentation || function(){};
}
});
let aRedactIdsOrder = Array.from(oRedactIdsSet).sort((a, b) => {
const ia = a.indexOf("_redact_") + 8;
const ib = b.indexOf("_redact_") + 8;
return parseInt(a.slice(ia)) - parseInt(b.slice(ib));
});
let aRedactIdsOrder = Array.from(oRedactIdsSet).sort(function(a, b) {
const ia = a.indexOf("_redact_") + 8;
const ib = b.indexOf("_redact_") + 8;
return parseInt(a.slice(ia)) - parseInt(b.slice(ib));
});
aRedactIdsOrder.forEach(function(id) {
oThis.ApplyRedact(id, nInsertPos);
@ -10530,7 +10530,11 @@ var CPresentation = CPresentation || function(){};
let pts;
if (rect.length === 4) {
const [x1, y1, x2, y2] = rect;
const x1 = rect[0];
const y1 = rect[1];
const x2 = rect[2];
const y2 = rect[3];
pts = [
[x1, y1],
[x2, y1],
@ -10546,17 +10550,6 @@ var CPresentation = CPresentation || function(){};
];
}
// Центр через bbox углов (универсально)
let minX = pts[0][0], maxX = pts[0][0];
let minY = pts[0][1], maxY = pts[0][1];
for (let i = 1; i < 4; i++) {
const [x, y] = pts[i];
if (x < minX) minX = x;
if (x > maxX) maxX = x;
if (y < minY) minY = y;
if (y > maxY) maxY = y;
}
const cx = (pts[0][0] + pts[1][0] + pts[2][0] + pts[3][0]) / 4;
const cy = (pts[0][1] + pts[1][1] + pts[2][1] + pts[3][1]) / 4;
@ -10566,7 +10559,9 @@ var CPresentation = CPresentation || function(){};
const res = [];
for (let i = 0; i < 4; i++) {
const [x, y] = pts[i];
const x = pts[i][0];
const y = pts[i][1];
const dx = x - cx;
const dy = y - cy;
@ -10580,7 +10575,10 @@ var CPresentation = CPresentation || function(){};
}
function getQuadsRot(points) {
const [x1, y1, x2, y2] = points;
const x1 = points[0];
const y1 = points[1];
const x2 = points[2];
const y2 = points[3];
const dx = x2 - x1;
const dy = y2 - y1;

View File

@ -347,7 +347,11 @@
let aFillColor = oRGBAFill ? [oRGBAFill.R / 255, oRGBAFill.G / 255, oRGBAFill.B / 255] : null;
function rotateRect(rect, rad) {
const [x1, y1, x2, y2] = rect;
const x1 = rect[0];
const y1 = rect[1];
const x2 = rect[2];
const y2 = rect[3];
const cx = (x1 + x2) * 0.5, cy = (y1 + y2) * 0.5;
const hw = (x2 - x1) * 0.5, hh = (y2 - y1) * 0.5;

View File

@ -169,7 +169,9 @@
this.markSetter.placeMarks(paragraph, ranges, handlerId);
let _ranges = [];
ranges.forEach(r => _ranges.push([r.start, r.length, r.id]))
ranges.forEach(function(r) {
_ranges.push([r.start, r.length, r.id]);
});
//console.log(`Response from handlerId=${handlerId} ParaId=${paraId}; Ranges=${_ranges}`);
// TODO: Надо проверить ситуацию, когда меток не было, и они не появились