@panoramax/web-viewer 3.2.3-develop-587a6b56 → 3.2.3-develop-4ea4ef45

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "3.2.3-develop-587a6b56",
3
+ "version": "3.2.3-develop-4ea4ef45",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
@@ -2,6 +2,7 @@ import { LitElement, html, nothing, css } from "lit";
2
2
  import { classMap } from "lit/directives/class-map.js";
3
3
  import { fa } from "../../utils/widgets";
4
4
  import { faArrowLeft } from "@fortawesome/free-solid-svg-icons/faArrowLeft";
5
+ import { faChevronUp } from "@fortawesome/free-solid-svg-icons/faChevronUp";
5
6
  import { faChevronDown } from "@fortawesome/free-solid-svg-icons/faChevronDown";
6
7
  import { faUser } from "@fortawesome/free-solid-svg-icons/faUser";
7
8
  import { faCalendarAlt } from "@fortawesome/free-solid-svg-icons/faCalendarAlt";
@@ -151,7 +152,7 @@ export default class PictureLegend extends LitElement {
151
152
  _onPicChange(picMeta) {
152
153
  clearTimeout(this._addrTimer1);
153
154
  this._caption = picMeta?.caption;
154
- this._expanded = !this.collapsable;
155
+ this._expanded = this._expanded && this.collapsable;
155
156
 
156
157
  if(picMeta) {
157
158
  const coordsHash = `${picMeta.gps[0]}/${picMeta.gps[1]}`;
@@ -177,8 +178,7 @@ export default class PictureLegend extends LitElement {
177
178
 
178
179
  /** @private */
179
180
  _onBackClick() {
180
- if(this._expanded && this.collapsable) { this._expanded = false; }
181
- else { this._parent.select(); }
181
+ this._parent._setFocus?.("map");
182
182
  }
183
183
 
184
184
  /** @private */
@@ -190,12 +190,14 @@ export default class PictureLegend extends LitElement {
190
190
 
191
191
  return html`
192
192
  <div class="headline">
193
- <pnx-button
194
- kind="superinline"
195
- @click=${this._onBackClick}
196
- >
197
- ${fa(faArrowLeft)}
198
- </pnx-button>
193
+ ${this._parent._setFocus ? html`
194
+ <pnx-button
195
+ kind="superinline"
196
+ @click=${this._onBackClick}
197
+ >
198
+ ${fa(faArrowLeft)}
199
+ </pnx-button>
200
+ ` : nothing}
199
201
 
200
202
  <div id="pic-legend-addr">
201
203
  ${this._addr?.length > 0 ? this._addr : html`<span class="pnx-placeholder-loading">&nbsp;</span>`}
@@ -236,14 +238,14 @@ export default class PictureLegend extends LitElement {
236
238
  </slot>
237
239
  </div>
238
240
 
241
+ <pnx-picture-metadata class=${shownExpanded} ._parent=${this._parent}></pnx-picture-metadata>
242
+
239
243
  ${this.collapsable ? html`<pnx-button
240
- kind="full"
244
+ kind="inline"
245
+ size="sm"
241
246
  id="pic-legend-expand"
242
- class=${hiddenExpanded}
243
- @click=${() => this._expanded = true}
244
- >${fa(faChevronDown)}</pnx-button>` : nothing}
245
-
246
- <pnx-picture-metadata class=${shownExpanded} ._parent=${this._parent}></pnx-picture-metadata>
247
+ @click=${() => this._expanded = !this._expanded}
248
+ >${this._expanded ? fa(faChevronUp) : fa(faChevronDown)}</pnx-button>` : nothing}
247
249
  `;
248
250
  }
249
251
  }
package/src/utils/i18n.js CHANGED
@@ -7,6 +7,7 @@ import T_fr from "../translations/fr.json";
7
7
  import T_hu from "../translations/hu.json";
8
8
  import T_it from "../translations/it.json";
9
9
  import T_ja from "../translations/ja.json";
10
+ import T_nl from "../translations/nl.json";
10
11
  import T_pl from "../translations/pl.json";
11
12
  import T_sv from "../translations/sv.json";
12
13
  import T_zh_Hant from "../translations/zh_Hant.json";
@@ -14,7 +15,7 @@ import T_zh_Hant from "../translations/zh_Hant.json";
14
15
  const FALLBACK_LOCALE = "en";
15
16
  const TRANSLATIONS = {
16
17
  "da": T_da, "de": T_de, "eo": T_eo, "en": T_en, "es": T_es, "fr": T_fr,
17
- "hu": T_hu, "it": T_it, "ja": T_ja, "pl": T_pl, "sv": T_sv, "zh-Hant": T_zh_Hant,
18
+ "hu": T_hu, "it": T_it, "ja": T_ja, "nl": T_nl, "pl": T_pl, "sv": T_sv, "zh-Hant": T_zh_Hant,
18
19
  "zh": T_zh_Hant,
19
20
  };
20
21