@geogirafe/lib-geoportal 1.0.2263190687 → 1.0.2263318691

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,5 @@ import DrawingComponent from './component.js';
2
2
  export default class DrawingComponentMobile extends DrawingComponent {
3
3
  template: () => import("uhtml").Hole;
4
4
  constructor();
5
+ protected connectedCallback(): void;
5
6
  }
@@ -15,4 +15,12 @@ button.selected{background-color:#daebff!important;border:1px solid #54a4ff!impo
15
15
  constructor() {
16
16
  super('drawing-mobile');
17
17
  }
18
+ connectedCallback() {
19
+ super.connectedCallback();
20
+ this.subscribe('interface.swipeupPanelContent', (_oldContent, newContent) => {
21
+ if (this.state.interface.swipeupPanelContent === 'drawing' || newContent === 'drawing') {
22
+ this.togglePanel(true);
23
+ }
24
+ });
25
+ }
18
26
  }
@@ -16,10 +16,10 @@ export default class DrawingContainerMobile extends GirafeHTMLElement {
16
16
  }
17
17
  connectedCallback() {
18
18
  super.connectedCallback();
19
- this.subscribe('interface.swipeupPanelContent', () => {
19
+ this.subscribe('interface.swipeupPanelContent', (_oldContent, newContent) => {
20
20
  // Disable the drawing mode if the swipeup panel were to host anything else than
21
21
  // the drawing toolbox
22
- if (this.state.interface.swipeupPanelContent !== 'drawing') {
22
+ if (this.state.interface.swipeupPanelContent !== 'drawing' && newContent !== 'drawing') {
23
23
  this.state.interface.drawingPanelVisible = false;
24
24
  }
25
25
  this.render();
@@ -10,14 +10,13 @@ export default class MenuMobileOfflineButton extends GirafeHTMLElement {
10
10
  icon = 'icons/offline.svg';
11
11
  label = 'Offline mode';
12
12
  constructor() {
13
- super('mobile-drawing-button');
13
+ super('mobile-offline-button');
14
14
  }
15
15
  onPointerUp() {
16
16
  // If not delaying, the releasing of the click is also fired
17
- // on the button of the drawing toolbox that's underneath
18
- // the pointer, resulting in selecting the polygon tool
17
+ // on the offline panel shown
19
18
  setTimeout(() => {
20
- this.state.interface.drawingPanelVisible = true;
19
+ this.state.interface.offlinePanelVisible = true;
21
20
  this.state.interface.swipeupPanelContent = 'offline';
22
21
  }, 50);
23
22
  }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "GeoGirafe PSC",
6
6
  "url": "https://doc.geomapfish.dev"
7
7
  },
8
- "version": "1.0.2263190687",
8
+ "version": "1.0.2263318691",
9
9
  "type": "module",
10
10
  "engines": {
11
11
  "node": ">=20.19.0"
@@ -1 +1 @@
1
- {"version":"1.0.2263190687", "build":"2263190687", "date":"14/01/2026"}
1
+ {"version":"1.0.2263318691", "build":"2263318691", "date":"14/01/2026"}
@@ -21,7 +21,7 @@ function customDnsLookup(hostname, arg1, arg2) {
21
21
  const callback = typeof arg1 === 'function' ? arg1 : arg2;
22
22
  const options = typeof arg1 === 'function' ? undefined : arg1;
23
23
  if (hostname === 'app.localhost') {
24
- callback(null, '127.0.0.1', 4);
24
+ callback(null, '127.0.0.1', 4); // use '0.0.0.0' for being accessible from other devices on the network
25
25
  } else {
26
26
  originalDnsLookup(hostname, options, callback);
27
27
  }
@@ -3,6 +3,7 @@ export default class GraphicalInterface {
3
3
  isMobile: boolean;
4
4
  helpVisible: boolean;
5
5
  drawingPanelVisible: boolean;
6
+ offlinePanelVisible: boolean;
6
7
  printPanelVisible: boolean;
7
8
  extLayerPanelVisible: boolean;
8
9
  crossSectionPanelVisible: boolean;
@@ -3,6 +3,7 @@ export default class GraphicalInterface {
3
3
  isMobile = false;
4
4
  helpVisible = false;
5
5
  drawingPanelVisible = false;
6
+ offlinePanelVisible = false;
6
7
  printPanelVisible = false;
7
8
  extLayerPanelVisible = false;
8
9
  crossSectionPanelVisible = false;