@panoramax/web-viewer 3.2.3-develop-48da552a → 3.2.3-develop-73663efd

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-48da552a",
3
+ "version": "3.2.3-develop-73663efd",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
@@ -266,7 +266,12 @@ export default class Viewer extends PhotoViewer {
266
266
  // Select after none selected -> show pic wide
267
267
  else {
268
268
  this.mini.classList.remove("pnx-hidden");
269
- if(isNullId(old)) { this._setFocus("pic"); }
269
+ if(isNullId(old)) {
270
+ this._setFocus("pic");
271
+ if(this.bottomDrawer?.getAttribute?.("openness") === "closed") {
272
+ this.bottomDrawer.setAttribute("openness", "half-opened");
273
+ }
274
+ }
270
275
  }
271
276
  }
272
277
 
@@ -93,14 +93,21 @@ export default class BottomDrawer extends LitElement {
93
93
  /** @private */
94
94
  firstUpdated() {
95
95
  super.firstUpdated();
96
+
96
97
  this._boundTouchMove = this._onTouchMove.bind(this);
97
98
  this._boundTouchEnd = this._onTouchEnd.bind(this);
98
99
 
99
100
  this._drawerHeight = window.innerHeight - 30;
101
+
100
102
  const drawer = this._getDrawer();
101
103
  if (!drawer) { return; }
102
104
  drawer.style.height = `${this._drawerHeight}px`;
103
105
  drawer.style.maxHeight = `${this._drawerHeight}px`;
106
+
107
+ this._parent?.onceReady().then(() => {
108
+ this._parent.map?.addEventListener("click", () => this.openness = "closed");
109
+ this._parent.psv?.addEventListener("click", () => this.openness = "closed");
110
+ });
104
111
  }
105
112
 
106
113
  /** @private */
@@ -72,9 +72,15 @@ export default class CopyButton extends LitElement {
72
72
  else if(this.text !== "") {
73
73
  textToCopy = this.text;
74
74
  }
75
- navigator.clipboard.writeText(textToCopy);
76
- this._active = true;
77
- setTimeout(() => this._active = false, 2000);
75
+
76
+ if(!navigator?.clipboard) {
77
+ alert("Clipboard is not available");
78
+ }
79
+ else {
80
+ navigator.clipboard.writeText(textToCopy);
81
+ this._active = true;
82
+ setTimeout(() => this._active = false, 2000);
83
+ }
78
84
  }
79
85
 
80
86
  /** @private */
@@ -98,6 +98,7 @@ export default class TogglableGroup extends LitElement {
98
98
  menu.style.right = null;
99
99
  menu.style.left = null;
100
100
  menu.style.overflowY = null;
101
+ menu.style.marginTop = null;
101
102
 
102
103
  // Get positions on screen
103
104
  const btnRect = btn.getBoundingClientRect();
@@ -130,7 +131,7 @@ export default class TogglableGroup extends LitElement {
130
131
  }
131
132
  // Overflows width = move to left
132
133
  else if(!fitsWidth) {
133
- menu.style.top = `${btnRect.bottom+btnMenuMargin}px`;
134
+ menu.style.marginTop = `${btnMenuMargin}px`;
134
135
  menu.style.right = `${window.innerWidth - btnRect.right}px`;
135
136
  }
136
137
  }
@@ -183,7 +183,8 @@
183
183
  "metadata_summary": "摘要",
184
184
  "picture_flat_long": "經典相片",
185
185
  "geo_uri": "外部程式",
186
- "contribute_id": "透過 iD 編輯器來貢獻 OpenStreetMap"
186
+ "contribute_id": "透過 iD 編輯器來貢獻 OpenStreetMap",
187
+ "filter_date_6months": "6 個月"
187
188
  },
188
189
  "map": {
189
190
  "loading": "正在載入…",