Skip to content

Commit

Permalink
On mobile use 0.6 initial-scale for bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
raitisbe committed Oct 11, 2019
1 parent a58cabb commit 6a20072
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/layout/layout.controller.js
Expand Up @@ -451,7 +451,7 @@ export default ['$scope', '$injector', '$rootScope', '$window', 'Core', 'hs.map.

$scope.onlyEnabled = function (item) {
return item.enabled;
};
};

$scope.$emit('scope_loaded', "Layout");
}
Expand Down
6 changes: 6 additions & 0 deletions components/layout/layout.directive.js
Expand Up @@ -43,6 +43,12 @@ export default ['hs.map.service', 'Core', '$timeout', 'config', '$compile', '$in
} else {
import('bootstrap/dist/css/bootstrap.css')
}
$timeout(_ => {
if(window.innerWidth < 600){
var viewport = document.querySelector('meta[name="viewport"]');
viewport.setAttribute("content", "width=device-width, initial-scale=0.6, maximum-scale=2, user-scalable=no");
}
}, 500);
}
import('css/app.css');
if (!!window.cordova) {
Expand Down

0 comments on commit 6a20072

Please sign in to comment.