[SSE] fixed launch for scaled DiagramEditor
This commit is contained in:
parent
735eb452c3
commit
c8559792e1
|
@ -5,6 +5,15 @@ function checkScaling() {
|
||||||
if ( window.matchMedia(str_mq_150).matches ) {
|
if ( window.matchMedia(str_mq_150).matches ) {
|
||||||
document.body.classList.add('pixel-ratio__1_5');
|
document.body.classList.add('pixel-ratio__1_5');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !window.matchMedia("screen and (-webkit-device-pixel-ratio: 1.5)," +
|
||||||
|
"screen and (-webkit-device-pixel-ratio: 1)," +
|
||||||
|
"screen and (-webkit-device-pixel-ratio: 2)").matches )
|
||||||
|
{
|
||||||
|
// don't add zoom for mobile devices
|
||||||
|
if (!(/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent || navigator.vendor || window.opera)))
|
||||||
|
document.getElementsByTagName('html')[0].setAttribute('style', 'zoom: ' + (1 / window.devicePixelRatio) + ';');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkScaling();
|
checkScaling();
|
||||||
|
|
|
@ -184,10 +184,6 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// don't add zoom for mobile devices
|
|
||||||
// if (!(/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent || navigator.vendor || window.opera)))
|
|
||||||
// document.getElementsByTagName('html')[0].setAttribute('style', 'zoom: ' + 1 / (window.devicePixelRatio < 2 ? window.devicePixelRatio : window.devicePixelRatio / 2) + ';');
|
|
||||||
|
|
||||||
var userAgent = navigator.userAgent.toLowerCase(),
|
var userAgent = navigator.userAgent.toLowerCase(),
|
||||||
check = function(regex){ return regex.test(userAgent); },
|
check = function(regex){ return regex.test(userAgent); },
|
||||||
stopLoading = false;
|
stopLoading = false;
|
||||||
|
|
|
@ -186,10 +186,6 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// don't add zoom for mobile devices
|
|
||||||
if (!(/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent || navigator.vendor || window.opera)))
|
|
||||||
document.getElementsByTagName('html')[0].setAttribute('style', 'zoom: ' + 1 / (window.devicePixelRatio < 2 ? window.devicePixelRatio : window.devicePixelRatio / 2) + ';');
|
|
||||||
|
|
||||||
var userAgent = navigator.userAgent.toLowerCase(),
|
var userAgent = navigator.userAgent.toLowerCase(),
|
||||||
check = function(regex){ return regex.test(userAgent); },
|
check = function(regex){ return regex.test(userAgent); },
|
||||||
stopLoading = false;
|
stopLoading = false;
|
||||||
|
|
|
@ -112,8 +112,6 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// don't add zoom for mobile devices
|
// don't add zoom for mobile devices
|
||||||
if (!(/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent || navigator.vendor || window.opera)))
|
|
||||||
document.getElementsByTagName('html')[0].setAttribute('style', 'zoom: ' + 1 / (window.devicePixelRatio < 2 ? window.devicePixelRatio : window.devicePixelRatio / 2) + ';');
|
|
||||||
|
|
||||||
var userAgent = navigator.userAgent.toLowerCase(),
|
var userAgent = navigator.userAgent.toLowerCase(),
|
||||||
check = function(regex){ return regex.test(userAgent); },
|
check = function(regex){ return regex.test(userAgent); },
|
||||||
|
@ -178,6 +176,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<script src="../../common/main/lib/util/htmlutils.js"></script>
|
||||||
<div id="loading-mask" class="loadmask">
|
<div id="loading-mask" class="loadmask">
|
||||||
<div class="skformula">
|
<div class="skformula">
|
||||||
<ul><li/><li/></ul>
|
<ul><li/><li/></ul>
|
||||||
|
|
|
@ -113,10 +113,6 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// don't add zoom for mobile devices
|
|
||||||
if (!(/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent || navigator.vendor || window.opera)))
|
|
||||||
document.getElementsByTagName('html')[0].setAttribute('style', 'zoom: ' + 1 / (window.devicePixelRatio < 2 ? window.devicePixelRatio : window.devicePixelRatio / 2) + ';');
|
|
||||||
|
|
||||||
var userAgent = navigator.userAgent.toLowerCase(),
|
var userAgent = navigator.userAgent.toLowerCase(),
|
||||||
check = function(regex){ return regex.test(userAgent); },
|
check = function(regex){ return regex.test(userAgent); },
|
||||||
stopLoading = false;
|
stopLoading = false;
|
||||||
|
@ -187,6 +183,7 @@
|
||||||
<link rel="stylesheet" type="text/css" href="../../../apps/spreadsheeteditor/main/resources/css/app.css">
|
<link rel="stylesheet" type="text/css" href="../../../apps/spreadsheeteditor/main/resources/css/app.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>
|
||||||
<div id="loading-mask" class="loadmask">
|
<div id="loading-mask" class="loadmask">
|
||||||
<div class="skformula">
|
<div class="skformula">
|
||||||
<ul><li/><li/></ul>
|
<ul><li/><li/></ul>
|
||||||
|
|
Loading…
Reference in a new issue