Comparing availwidth vs width
This commit is contained in:
parent
db248be302
commit
cf939c2bd3
2 changed files with 11 additions and 2 deletions
|
|
@ -13,6 +13,8 @@ const ScanBlocks = () => (
|
|||
<>
|
||||
<ScreenBlock />
|
||||
<NavigatorBlock />
|
||||
{/* <LocationBlock />
|
||||
<ConnectionBlock /> */}
|
||||
{/* <FingerprintBlock />
|
||||
<LocationBlock />
|
||||
<ConnectionBlock />
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ const getWidth = () => ({
|
|||
key: 'width',
|
||||
title: 'Width',
|
||||
value: window.screen.width,
|
||||
issues: checkScreenProperties('width'),
|
||||
issues: checkScreenProperties('width') + checkWidth(),
|
||||
});
|
||||
|
||||
const getOuterWidth = () => ({
|
||||
|
|
@ -124,7 +124,7 @@ const getAvailWidth = () => ({
|
|||
key: 'availWidth',
|
||||
title: 'Avail width',
|
||||
value: window.screen.availWidth,
|
||||
issues: checkScreenProperties('availWidth'),
|
||||
issues: checkScreenProperties('availWidth') + checkWidth(),
|
||||
});
|
||||
|
||||
const getHeight = () => ({
|
||||
|
|
@ -266,6 +266,13 @@ const checkScreenProperties = (key) => {
|
|||
// return list.toString().split(',').join('<br />');
|
||||
// };
|
||||
|
||||
const checkWidth = () => {
|
||||
if (window.screen.availWidth > window.screen.width) {
|
||||
return '<br />Avail width is wider then width';
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
const checkWebWorker = (key, setWorkerData) => {
|
||||
let w;
|
||||
if (typeof w === 'undefined') {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue