@panoramax/web-viewer 3.2.3-develop-357c83ca → 3.2.3-develop-d26f8f3d
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/CHANGELOG.md +1 -0
- package/build/index.js +8 -8
- package/build/index.js.map +1 -1
- package/docs/reference/components/ui/widgets/Player.md +1 -0
- package/package.json +1 -1
- package/src/components/core/PhotoViewer.js +6 -1
- package/src/components/core/Viewer.js +6 -1
- package/src/components/ui/ButtonGroup.js +3 -3
- package/src/components/ui/Photo.js +1 -1
- package/src/components/ui/widgets/Player.js +4 -1
- package/src/translations/zh_Hant.json +4 -2
- package/tests/components/core/BasicMock.js +1 -0
- package/tests/components/core/Viewer.test.js +1 -0
- package/tests/components/core/__snapshots__/PhotoViewer.test.js.snap +2 -0
- package/tests/components/core/__snapshots__/Viewer.test.js.snap +2 -0
|
@@ -29,4 +29,5 @@ Component properties.
|
|
|
29
29
|
| Name | Type | Default | Description |
|
|
30
30
|
| --- | --- | --- | --- |
|
|
31
31
|
| [playing] | <code>boolean</code> | <code>false</code> | Is sequence currently playing ? |
|
|
32
|
+
| [size] | <code>string</code> | <code>"xl"</code> | Group size (md, xl) |
|
|
32
33
|
|
package/package.json
CHANGED
|
@@ -141,7 +141,12 @@ export default class PhotoViewer extends Basic {
|
|
|
141
141
|
picture: this._initParams.getParentPostInit().picture,
|
|
142
142
|
});
|
|
143
143
|
this.grid.appendChild(this.legend);
|
|
144
|
-
this.grid.appendChild(createWebComp("pnx-widget-player", {
|
|
144
|
+
this.grid.appendChild(createWebComp("pnx-widget-player", {
|
|
145
|
+
slot: "top",
|
|
146
|
+
_parent: this,
|
|
147
|
+
class: "pnx-only-psv pnx-print-hidden",
|
|
148
|
+
size: this.isHeightSmall() ? "md": "xl",
|
|
149
|
+
}));
|
|
145
150
|
}
|
|
146
151
|
}
|
|
147
152
|
|
|
@@ -154,7 +154,12 @@ export default class Viewer extends PhotoViewer {
|
|
|
154
154
|
picture: this._initParams.getParentPostInit().picture,
|
|
155
155
|
});
|
|
156
156
|
this.grid.appendChild(this.legend);
|
|
157
|
-
this.grid.appendChild(createWebComp("pnx-widget-player", {
|
|
157
|
+
this.grid.appendChild(createWebComp("pnx-widget-player", {
|
|
158
|
+
slot: "top",
|
|
159
|
+
_parent: this,
|
|
160
|
+
class: "pnx-only-psv pnx-print-hidden",
|
|
161
|
+
size: this.isHeightSmall() ? "md": "xl",
|
|
162
|
+
}));
|
|
158
163
|
|
|
159
164
|
this.grid.appendChild(createWebComp("pnx-widget-geosearch", {
|
|
160
165
|
slot: this.isWidthSmall() ? "top-right" : "top-left",
|
|
@@ -30,10 +30,10 @@ export default class ButtonGroup extends LitElement {
|
|
|
30
30
|
|
|
31
31
|
div.xl { line-height: 38px; font-size: 20px; }
|
|
32
32
|
div.row.xl { height: 38px; }
|
|
33
|
-
div.column.xl { width: 38px;}
|
|
33
|
+
div.column.xl { width: 38px; }
|
|
34
34
|
|
|
35
|
-
div.row ::slotted(*) { height: 100%; }
|
|
36
|
-
div.column ::slotted(*) { width: 100%; }
|
|
35
|
+
div.row ::slotted(*) { height: 100%; min-width: 24px; }
|
|
36
|
+
div.column ::slotted(*) { width: 100%; min-height: 24px; }
|
|
37
37
|
|
|
38
38
|
div.row.xl ::slotted(*) { min-width: 38px; }
|
|
39
39
|
div.column.xl ::slotted(*) { min-height: 38px; }
|
|
@@ -45,7 +45,7 @@ PSViewer.useNewAnglesOrder = true;
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Triggered once when the panorama image has been loaded and the viewer is ready to perform the first render.
|
|
48
|
-
* @see
|
|
48
|
+
* @see {@link https://photo-sphere-viewer.js.org/guide/events.html#ready|Photo Sphere Viewer documentation}
|
|
49
49
|
* @event Panoramax.components.ui.Photo#ready
|
|
50
50
|
* @memberof Panoramax.components.ui.Photo
|
|
51
51
|
* @type {Event}
|
|
@@ -23,9 +23,11 @@ export default class Player extends LitElement {
|
|
|
23
23
|
* @memberof Panoramax.components.ui.widgets.Player#
|
|
24
24
|
* @type {Object}
|
|
25
25
|
* @property {boolean} [playing=false] Is sequence currently playing ?
|
|
26
|
+
* @property {string} [size=xl] Group size (md, xl)
|
|
26
27
|
*/
|
|
27
28
|
static properties = {
|
|
28
29
|
playing: {type: Boolean, reflect: true},
|
|
30
|
+
size: {type: String},
|
|
29
31
|
_activePrev: {state: true},
|
|
30
32
|
_activePlay: {state: true},
|
|
31
33
|
_activeNext: {state: true},
|
|
@@ -35,6 +37,7 @@ export default class Player extends LitElement {
|
|
|
35
37
|
super();
|
|
36
38
|
|
|
37
39
|
this.playing = false;
|
|
40
|
+
this.size = "xl";
|
|
38
41
|
this._activePrev = true;
|
|
39
42
|
this._activePlay = true;
|
|
40
43
|
this._activeNext = true;
|
|
@@ -100,7 +103,7 @@ export default class Player extends LitElement {
|
|
|
100
103
|
<pnx-button-group
|
|
101
104
|
id="pnx-widget-player"
|
|
102
105
|
dir="row"
|
|
103
|
-
size
|
|
106
|
+
size=${this.size}
|
|
104
107
|
class="pnx-print-hidden"
|
|
105
108
|
>
|
|
106
109
|
<pnx-button
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"filter_date_1month": "1 個月",
|
|
163
163
|
"filter_date_1year": "1 年",
|
|
164
164
|
"qualityscore_doc_2": "分數以 A/B/C/D/E 等級的形式顯示 (A 最佳、E 最差) ,並透過這個量尺視覺化顯示:",
|
|
165
|
-
"qualityscore_doc_link": "
|
|
165
|
+
"qualityscore_doc_link": "深入了解品質分數",
|
|
166
166
|
"qualityscore_title": "關於品質分數",
|
|
167
167
|
"qualityscore_doc_1": "Panoramax 為每張相片提供品質分數,這能幫助我們輕鬆地在地圖上篩選和顯示高品質相片。",
|
|
168
168
|
"qualityscore_doc_3": "它根據 GPS 精確度和相片解析度計算得出,專業設備的等級為 A、360° 運動相機的等級為 B、智慧型手機的等級為 C/D/E。",
|
|
@@ -172,7 +172,9 @@
|
|
|
172
172
|
"loading": "正在載入…",
|
|
173
173
|
"not_public": "未公開顯示",
|
|
174
174
|
"thumbnail": "遊標懸停相片的縮圖",
|
|
175
|
-
"slow_loading": "地圖載入速度緩慢而且可能出現損壞"
|
|
175
|
+
"slow_loading": "地圖載入速度緩慢而且可能出現損壞",
|
|
176
|
+
"more_panoramax": "深入了解 Panoramax",
|
|
177
|
+
"map_data": "地圖資料:"
|
|
176
178
|
},
|
|
177
179
|
"psv": {
|
|
178
180
|
"ctrlZoom": "使用 CTRL + 滑鼠滾輪縮放圖片",
|
|
@@ -16,6 +16,7 @@ jest.mock("../../../src/components/core/PhotoViewer", () => (
|
|
|
16
16
|
}
|
|
17
17
|
getAttribute() { return null; }
|
|
18
18
|
isWidthSmall() { return false; }
|
|
19
|
+
isHeightSmall() { return false; }
|
|
19
20
|
getSubComponentsNames() {
|
|
20
21
|
return ["loader", "api", "psv", "grid", "popup", "urlHandler"];
|
|
21
22
|
}
|
|
@@ -25,6 +25,7 @@ exports[`_initWidgets should handle widgets if width is not small 1`] = `
|
|
|
25
25
|
Array [
|
|
26
26
|
<pnx-widget-player
|
|
27
27
|
class="pnx-only-psv pnx-print-hidden"
|
|
28
|
+
size="xl"
|
|
28
29
|
slot="top"
|
|
29
30
|
/>,
|
|
30
31
|
],
|
|
@@ -69,6 +70,7 @@ exports[`_initWidgets should handle widgets if width is small 1`] = `
|
|
|
69
70
|
Array [
|
|
70
71
|
<pnx-widget-player
|
|
71
72
|
class="pnx-only-psv pnx-print-hidden"
|
|
73
|
+
size="xl"
|
|
72
74
|
slot="top"
|
|
73
75
|
/>,
|
|
74
76
|
],
|
|
@@ -25,6 +25,7 @@ exports[`_initWidgets should handle widgets if width is not small 1`] = `
|
|
|
25
25
|
Array [
|
|
26
26
|
<pnx-widget-player
|
|
27
27
|
class="pnx-only-psv pnx-print-hidden"
|
|
28
|
+
size="xl"
|
|
28
29
|
slot="top"
|
|
29
30
|
/>,
|
|
30
31
|
],
|
|
@@ -106,6 +107,7 @@ exports[`_initWidgets should handle widgets if width is small 1`] = `
|
|
|
106
107
|
Array [
|
|
107
108
|
<pnx-widget-player
|
|
108
109
|
class="pnx-only-psv pnx-print-hidden"
|
|
110
|
+
size="xl"
|
|
109
111
|
slot="top"
|
|
110
112
|
/>,
|
|
111
113
|
],
|