Skip to content

Commit

Permalink
fix(app): on native devices (not web), disable layout zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitMY committed Sep 24, 2023
1 parent 0847431 commit fb2c754
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@
"@sign-mt/i18n": "git://github.com/sign/i18n.git",
"@sutton-signwriting/font-ttf": "1.5.0",
"@sutton-signwriting/sgnw-components": "1.1.0",
"@tensorflow/tfjs": "4.11.0",
"@tensorflow/tfjs-backend-wasm": "4.11.0",
"@tensorflow/tfjs-backend-webgl": "4.11.0",
"@tensorflow/tfjs-backend-webgpu": "4.11.0",
"@tensorflow/tfjs-converter": "4.11.0",
"@tensorflow/tfjs-core": "4.11.0",
"@tensorflow/tfjs-layers": "4.11.0",
"@tensorflow/tfjs": "4.10.0",
"@tensorflow/tfjs-backend-wasm": "4.10.0",
"@tensorflow/tfjs-backend-webgl": "4.10.0",
"@tensorflow/tfjs-backend-webgpu": "4.10.0",
"@tensorflow/tfjs-converter": "4.10.0",
"@tensorflow/tfjs-core": "4.10.0",
"@tensorflow/tfjs-layers": "4.10.0",
"base64-blob": "1.4.1",
"capacitor-blob-writer": "1.1.14",
"cld3-asm": "3.1.1",
Expand Down
9 changes: 8 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {NavigationEnd, Router} from '@angular/router';
import {GoogleAnalyticsService} from './core/modules/google-analytics/google-analytics.service';
import {Capacitor} from '@capacitor/core';
import {languageCodeNormalizer} from './core/modules/transloco/languages';
import {Meta} from '@angular/platform-browser';

@Component({
selector: 'app-root',
Expand All @@ -19,7 +20,7 @@ export class AppComponent implements AfterViewInit {
urlParams = this.getUrlParams();

constructor(
private platform: Platform,
private meta: Meta,
private ga: GoogleAnalyticsService,
private transloco: TranslocoService,
private router: Router,
Expand All @@ -34,6 +35,12 @@ export class AppComponent implements AfterViewInit {

async ngAfterViewInit() {
if (Capacitor.isNativePlatform()) {
this.meta.updateTag({
name: 'viewport',
content:
'minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, initial-scale=1.0, viewport-fit=cover, width=device-width',
});

const {SplashScreen} = await import(
/* webpackChunkName: "@capacitor/splash-screen" */ '@capacitor/splash-screen'
);
Expand Down

0 comments on commit fb2c754

Please sign in to comment.