Commit 693f0c23 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

add AscBrowser.isRetina


git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56605 954022d7-b5bf-4e40-9824-e11837661b57
parent e9cb2040
......@@ -14,7 +14,8 @@ var AscBrowser = {
isWebkit : false,
isSafari : false,
isArm : false,
isMozilla : false
isMozilla : false,
isRetina : false
};
// user agent lower case
......@@ -66,4 +67,7 @@ AscBrowser.isWebkit = (AscBrowser.userAgent.indexOf("webkit") > -1);
// arm detect
AscBrowser.isArm = (AscBrowser.userAgent.indexOf("arm") > -1);
AscBrowser.isMozilla = ((AscBrowser.userAgent.indexOf("firefox") > -1) && (!AscBrowser.isIE));
\ No newline at end of file
AscBrowser.isMozilla = ((AscBrowser.userAgent.indexOf("firefox") > -1) && (!AscBrowser.isIE));
// detect retina (http://habrahabr.ru/post/159419/)
AscBrowser.isRetina = 2 === window.devicePixelRatio;
\ No newline at end of file
......@@ -468,10 +468,7 @@ function CEditorPage(api)
var old = this.bIsRetinaSupport;
if (!this.bIsRetinaNoSupportAttack)
{
if (window.devicePixelRatio != 2)
this.bIsRetinaSupport = false;
else
this.bIsRetinaSupport = true;
this.bIsRetinaSupport = AscBrowser.isRetina;
}
else
{
......
......@@ -426,10 +426,7 @@ function CEditorPage(api)
var old = this.bIsRetinaSupport;
if (!this.bIsRetinaNoSupportAttack)
{
if (window.devicePixelRatio != 2)
this.bIsRetinaSupport = false;
else
this.bIsRetinaSupport = true;
this.bIsRetinaSupport = AscBrowser.isRetina;
}
else
{
......
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