Commit 9b873f8a authored by Ilya Kirillov's avatar Ilya Kirillov Committed by GitHub

Merge pull request #84 from ONLYOFFICE/release/v4.2.0

Release/v4.2.0
parents 5220aebd a4df5ad8
......@@ -116,18 +116,39 @@ AscBrowser.checkZoom = function()
if (AscBrowser.isAndroid)
return;
AscBrowser.zoom = 1.0;
AscBrowser.isRetina = false;
if (AscBrowser.isChrome && !AscBrowser.isOpera && document && document.firstElementChild && document.body)
{
document.firstElementChild.style.zoom = "reset";
AscBrowser.zoom = document.body.clientWidth / window.innerWidth;
if (window.innerWidth > 300)
AscBrowser.zoom = window.outerWidth / window.innerWidth;
if (Math.abs(AscBrowser.zoom - 1) < 0.1)
AscBrowser.zoom = 1;
AscBrowser.zoom = window.outerWidth / window.innerWidth;
var _devicePixelRatio = window.devicePixelRatio / AscBrowser.zoom;
// device pixel ratio: кратно 0.5
_devicePixelRatio = (5 * (((2.5 + 10 * _devicePixelRatio) / 5) >> 0)) / 10;
AscBrowser.zoom = window.devicePixelRatio / _devicePixelRatio;
if (2 == _devicePixelRatio)
AscBrowser.isRetina = true;
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
//document.firstElementChild.style.zoom = "reset";
document.firstElementChild.style.zoom = 1.0 / AscBrowser.zoom;
}
else
{
AscBrowser.isRetina = (Math.abs(2 - (window.devicePixelRatio / AscBrowser.zoom)) < 0.01);
}
};
AscBrowser.checkZoom();
// detect retina (http://habrahabr.ru/post/159419/)
AscBrowser.isRetina = (Math.abs(2 - (window.devicePixelRatio / AscBrowser.zoom)) < 0.01);
//--------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
......
This diff is collapsed.
......@@ -9094,14 +9094,14 @@ CTable.prototype =
}
}
this.Selection_Remove();
// Удаляем строки.
for ( var Index = Rows_to_delete.length - 1; Index >= 0; Index-- )
{
this.Internal_Remove_Row( Rows_to_delete[Index] );
}
this.Selection_Remove();
// Возвращаем курсор
this.DrawingDocument.TargetStart();
this.DrawingDocument.TargetShow();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment