Revert changes of git.onlyoffice.com/ONLYOFFICE/sdkjs/pulls/1461

This commit is contained in:
Eduard Belozertsev
2025-10-09 14:18:26 +07:00
parent 87b038dd8e
commit a68a99fa31

View File

@ -691,18 +691,7 @@
if (_sy >= _sb || _sy >= _h || _sb <= 0 || h <= 0)
return;
if (this.isVectorImage(img)) {
const canvas = this.m_oContext.canvas;
const scale = Math.min(canvas.width / img.width, canvas.height / img.height);
this.m_oContext.drawImage(
img,
_sx * scale, _sy * scale,
(_sr - _sx) * scale, (_sb - _sy) * scale,
x, y, w, h
);
} else {
this.m_oContext.drawImage(img, _sx, _sy, _sr - _sx, _sb - _sy, x, y, w, h);
}
this.m_oContext.drawImage(img, _sx, _sy, _sr - _sx, _sb - _sy, x, y, w, h);
}
else
{