mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
Revert changes of git.onlyoffice.com/ONLYOFFICE/sdkjs/pulls/1461
This commit is contained in:
@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user