Skip to content

Commit

Permalink
fix(ios): plan ign tout blanc
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Jan 25, 2024
1 parent 9f1d5ba commit 5849069
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
13 changes: 0 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/js/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import DOM from './dom';
import LayersConfig from './layer-manager/layer-config';
import LayersAdditional from './layer-manager/layer-additional';

import { Capacitor } from '@capacitor/core';

import ImageNotFound from '../html/img/image-not-found.png';
import DomUtils from "./dom-utils"

Expand Down
3 changes: 2 additions & 1 deletion src/js/layer-manager/layer-switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import ImageNotFound from '../../html/img/image-not-found.png';
import DomUtils from '../dom-utils';

import { Toast } from '@capacitor/toast';
import { Capacitor } from '@capacitor/core';


/**
Expand Down Expand Up @@ -276,7 +277,7 @@ class LayerSwitcher extends EventTarget {
var pos = this.layers[id].position;
var beforeId = this.map.getStyle().layers[pos].id;
var max = (pos === Object.keys(this.layers).length - 1);
if (Object.keys(this.layers).length === 1) {
if (Object.keys(this.layers).length === 1 && Capacitor.getPlatform() !== "ios") {
max = false;
}
if (!max) {
Expand Down

0 comments on commit 5849069

Please sign in to comment.