From 6a20072c627833396b9ad7c0dce473bc07198874 Mon Sep 17 00:00:00 2001 From: raitis Date: Fri, 11 Oct 2019 16:23:17 +0300 Subject: [PATCH] On mobile use 0.6 initial-scale for bootstrap --- components/layout/layout.controller.js | 2 +- components/layout/layout.directive.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/layout/layout.controller.js b/components/layout/layout.controller.js index 00c11eb82e..fe0bf8feaa 100644 --- a/components/layout/layout.controller.js +++ b/components/layout/layout.controller.js @@ -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"); } diff --git a/components/layout/layout.directive.js b/components/layout/layout.directive.js index 64012fe93c..091e7a1722 100644 --- a/components/layout/layout.directive.js +++ b/components/layout/layout.directive.js @@ -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) {