[common] restored 'checkSize' function
This commit is contained in:
parent
8075db0095
commit
0125ad24f3
|
@ -123,20 +123,19 @@ Common.Utils = _.extend(new(function() {
|
||||||
// считаем: 0 < window.devicePixelRatio < 2 => _devicePixelRatio = 1; zoom = window.devicePixelRatio / _devicePixelRatio;
|
// считаем: 0 < window.devicePixelRatio < 2 => _devicePixelRatio = 1; zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||||
// считаем: window.devicePixelRatio >= 2 => _devicePixelRatio = 2; zoom = window.devicePixelRatio / _devicePixelRatio;
|
// считаем: window.devicePixelRatio >= 2 => _devicePixelRatio = 2; zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||||
if (window.devicePixelRatio > 0.1) {
|
if (window.devicePixelRatio > 0.1) {
|
||||||
var _fraction = window.devicePixelRatio % 1;
|
if (window.devicePixelRatio < 1.99)
|
||||||
var _devicePixelRatio = Math.floor(window.devicePixelRatio);
|
{
|
||||||
|
var _devicePixelRatio = 1;
|
||||||
if ( !(_fraction < .5) ) {
|
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||||
_devicePixelRatio += .5;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
{
|
||||||
document.firstElementChild.style.zoom = 1.0 / me.zoom;
|
var _devicePixelRatio = 2;
|
||||||
|
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||||
if ( _devicePixelRatio % 1 > 0 )
|
}
|
||||||
$('#editor_sdk').css('zoom', 1.0 / _devicePixelRatio);
|
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
|
||||||
else $('#editor_sdk').css('zoom', '');
|
//document.firstElementChild.style.zoom = "reset";
|
||||||
}
|
document.firstElementChild.style.zoom = 1.0 / me.zoom; }
|
||||||
else
|
else
|
||||||
document.firstElementChild.style.zoom = "normal";
|
document.firstElementChild.style.zoom = "normal";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue