@panoramax/web-viewer 4.4.0-develop-3839b5a4 → 4.4.0-develop-f91f6758
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/{src → build}/components/core/Basic.js +22 -16
- package/{src → build}/components/core/CoverageMap.js +19 -14
- package/{src → build}/components/core/Editor.js +16 -16
- package/{src → build}/components/core/PhotoViewer.js +30 -29
- package/{src → build}/components/core/Viewer.js +21 -20
- package/build/components/core/index.js +10 -0
- package/build/components/index.js +11 -0
- package/build/components/index_photoviewer.js +6 -0
- package/{src → build}/components/layout/BottomDrawer.js +4 -4
- package/{src → build}/components/layout/CorneredGrid.js +1 -1
- package/{src → build}/components/layout/Mini.js +5 -4
- package/{src → build}/components/layout/Tabs.js +1 -1
- package/build/components/layout/index.js +9 -0
- package/{src → build}/components/menus/LocationPrecisionDoc.js +4 -6
- package/{src → build}/components/menus/MapBackground.js +4 -6
- package/{src → build}/components/menus/MapFilters.js +16 -21
- package/{src → build}/components/menus/MapLayers.js +20 -24
- package/{src → build}/components/menus/MapLegend.js +3 -4
- package/{src → build}/components/menus/MiniPictureLegend.js +3 -4
- package/{src → build}/components/menus/PictureLegend.js +10 -15
- package/{src → build}/components/menus/PictureMetadata.js +12 -19
- package/{src → build}/components/menus/PlayerOptions.js +5 -7
- package/{src → build}/components/menus/QualityScoreDoc.js +3 -4
- package/{src → build}/components/menus/ReportForm.js +8 -9
- package/{src → build}/components/menus/SemanticsDoc.js +3 -4
- package/{src → build}/components/menus/SemanticsDownload.js +3 -3
- package/{src → build}/components/menus/SemanticsFilters.js +7 -8
- package/{src → build}/components/menus/SemanticsList.js +11 -18
- package/{src → build}/components/menus/SemanticsMetadata.js +8 -11
- package/{src → build}/components/menus/Share.js +6 -7
- package/build/components/menus/index.js +22 -0
- package/build/components/menus/index_photoviewer.js +11 -0
- package/{src → build}/components/styles.js +0 -2
- package/{src → build}/components/ui/AnnotationsSwitch.js +6 -8
- package/{src → build}/components/ui/Button.js +1 -1
- package/{src → build}/components/ui/ButtonGroup.js +2 -1
- package/{src → build}/components/ui/CopyButton.js +4 -6
- package/{src → build}/components/ui/Grade.js +5 -5
- package/{src → build}/components/ui/GradeFilter.js +3 -3
- package/{src → build}/components/ui/IconSwitch.js +1 -1
- package/{src → build}/components/ui/LinkButton.js +1 -1
- package/{src → build}/components/ui/ListGroup.js +3 -3
- package/{src → build}/components/ui/ListItem.js +1 -1
- package/{src → build}/components/ui/Loader.js +8 -7
- package/{src → build}/components/ui/Map.js +38 -26
- package/{src → build}/components/ui/MapMore.js +7 -7
- package/{src → build}/components/ui/Photo.js +29 -27
- package/{src → build}/components/ui/Popup.js +4 -4
- package/{src → build}/components/ui/QualityScore.js +4 -4
- package/{src → build}/components/ui/SearchBar.js +6 -7
- package/{src → build}/components/ui/SemanticsEditor.js +14 -15
- package/{src → build}/components/ui/SemanticsTable.js +4 -5
- package/{src → build}/components/ui/Switch.js +1 -1
- package/{src → build}/components/ui/TogglableGroup.js +4 -4
- package/build/components/ui/index.js +29 -0
- package/build/components/ui/index_photoviewer.js +21 -0
- package/{src → build}/components/ui/widgets/CopyCoordinates.js +5 -5
- package/{src → build}/components/ui/widgets/GeoSearch.js +10 -10
- package/{src → build}/components/ui/widgets/Legend.js +9 -8
- package/{src → build}/components/ui/widgets/LevelSelect.js +9 -7
- package/{src → build}/components/ui/widgets/MapFiltersButton.js +5 -5
- package/{src → build}/components/ui/widgets/MapLayersButton.js +5 -5
- package/{src → build}/components/ui/widgets/OSMEditors.js +8 -8
- package/{src → build}/components/ui/widgets/PictureLegendActions.js +4 -4
- package/{src → build}/components/ui/widgets/Player.js +6 -7
- package/{src → build}/components/ui/widgets/SemanticsFiltersButton.js +6 -7
- package/{src → build}/components/ui/widgets/Zoom.js +6 -6
- package/build/components/ui/widgets/index.js +16 -0
- package/build/components/ui/widgets/index_photoviewer.js +7 -0
- package/build/editor.html +94 -10
- package/{src → build}/img/arrow_triangle.svg +0 -1
- package/{src → build}/img/arrow_turn.svg +0 -1
- package/build/index.html +111 -1
- package/build/index.js +6 -95
- package/build/index_photoviewer.js +4 -0
- package/build/map.html +97 -1
- package/build/package.json +141 -0
- package/build/photo.html +85 -1
- package/build/servers.js +3 -4
- package/{src → build}/utils/API.js +33 -33
- package/{src → build}/utils/InitParameters.js +11 -9
- package/{src → build}/utils/MapStyleComposer.js +39 -37
- package/{src → build}/utils/PhotoAdapter.js +1 -0
- package/{src → build}/utils/PresetsManager.js +4 -4
- package/{src → build}/utils/SemanticsMapProtocol.js +3 -4
- package/{src → build}/utils/URLHandler.js +16 -14
- package/{src → build}/utils/geocoder.js +5 -5
- package/{src → build}/utils/i18n.js +21 -20
- package/build/utils/index.js +17 -0
- package/build/utils/index_photoviewer.js +14 -0
- package/{src → build}/utils/indoor.js +9 -5
- package/{src → build}/utils/map.js +15 -11
- package/{src → build}/utils/picture.js +22 -17
- package/{src → build}/utils/semantics.js +9 -5
- package/{src → build}/utils/utils.js +8 -4
- package/{src → build}/utils/widgets.js +2 -2
- package/build/viewer.html +120 -35
- package/build/viewer_indoor.html +90 -8
- package/build/widgets.html +410 -1
- package/package.json +81 -204
- package/.dockerignore +0 -7
- package/.gitlab-ci.yml +0 -78
- package/CHANGELOG.md +0 -853
- package/CODE_OF_CONDUCT.md +0 -134
- package/Dockerfile +0 -14
- package/build/index.css +0 -36
- package/build/index.css.map +0 -1
- package/build/index.js.map +0 -1
- package/build/photoviewer.css +0 -36
- package/build/photoviewer.css.map +0 -1
- package/build/photoviewer.js +0 -86
- package/build/photoviewer.js.map +0 -1
- package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff2 +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff2 +0 -0
- package/config/env.js +0 -104
- package/config/getHttpsConfig.js +0 -69
- package/config/getPackageJson.js +0 -25
- package/config/jest/babelTransform.js +0 -29
- package/config/jest/cssTransform.js +0 -14
- package/config/jest/fileTransform.js +0 -40
- package/config/jest/mocks.js +0 -230
- package/config/modules.js +0 -134
- package/config/paths.js +0 -76
- package/config/pnpTs.js +0 -35
- package/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
- package/config/webpack.config.js +0 -825
- package/config/webpackDevServer.config.js +0 -131
- package/docs/03_URL_settings.md +0 -218
- package/docs/05_Compatibility.md +0 -83
- package/docs/09_Develop.md +0 -141
- package/docs/90_Releases.md +0 -27
- package/docs/images/class_diagram.drawio +0 -144
- package/docs/images/class_diagram.jpg +0 -0
- package/docs/images/comparative_3drender.jpg +0 -0
- package/docs/images/indoor_level.png +0 -0
- package/docs/images/screenshot.jpg +0 -0
- package/docs/index.md +0 -159
- package/docs/reference/components/core/Basic.md +0 -211
- package/docs/reference/components/core/CoverageMap.md +0 -220
- package/docs/reference/components/core/Editor.md +0 -252
- package/docs/reference/components/core/PhotoViewer.md +0 -320
- package/docs/reference/components/core/Viewer.md +0 -398
- package/docs/reference/components/layout/BottomDrawer.md +0 -35
- package/docs/reference/components/layout/CorneredGrid.md +0 -29
- package/docs/reference/components/layout/Mini.md +0 -45
- package/docs/reference/components/layout/Tabs.md +0 -46
- package/docs/reference/components/menus/LocationPrecisionDoc.md +0 -15
- package/docs/reference/components/menus/MapBackground.md +0 -32
- package/docs/reference/components/menus/MapFilters.md +0 -37
- package/docs/reference/components/menus/MapLayers.md +0 -15
- package/docs/reference/components/menus/MapLegend.md +0 -32
- package/docs/reference/components/menus/MiniPictureLegend.md +0 -15
- package/docs/reference/components/menus/PictureLegend.md +0 -45
- package/docs/reference/components/menus/PictureMetadata.md +0 -32
- package/docs/reference/components/menus/PlayerOptions.md +0 -15
- package/docs/reference/components/menus/QualityScoreDoc.md +0 -15
- package/docs/reference/components/menus/ReportForm.md +0 -15
- package/docs/reference/components/menus/SemanticsDoc.md +0 -15
- package/docs/reference/components/menus/SemanticsDownload.md +0 -15
- package/docs/reference/components/menus/SemanticsFilters.md +0 -33
- package/docs/reference/components/menus/SemanticsList.md +0 -97
- package/docs/reference/components/menus/SemanticsMetadata.md +0 -15
- package/docs/reference/components/menus/ShareMenu.md +0 -32
- package/docs/reference/components/ui/AnnotationsSwitch.md +0 -32
- package/docs/reference/components/ui/Button.md +0 -40
- package/docs/reference/components/ui/ButtonGroup.md +0 -36
- package/docs/reference/components/ui/CopyButton.md +0 -41
- package/docs/reference/components/ui/Grade.md +0 -32
- package/docs/reference/components/ui/GradeFilter.md +0 -42
- package/docs/reference/components/ui/IconSwitch.md +0 -53
- package/docs/reference/components/ui/LinkButton.md +0 -45
- package/docs/reference/components/ui/ListGroup.md +0 -22
- package/docs/reference/components/ui/ListItem.md +0 -39
- package/docs/reference/components/ui/Loader.md +0 -56
- package/docs/reference/components/ui/Map.md +0 -150
- package/docs/reference/components/ui/MapMore.md +0 -150
- package/docs/reference/components/ui/Photo.md +0 -495
- package/docs/reference/components/ui/Popup.md +0 -56
- package/docs/reference/components/ui/ProgressBar.md +0 -32
- package/docs/reference/components/ui/QualityScore.md +0 -45
- package/docs/reference/components/ui/SearchBar.md +0 -63
- package/docs/reference/components/ui/SemanticsEditor.md +0 -113
- package/docs/reference/components/ui/SemanticsTable.md +0 -32
- package/docs/reference/components/ui/Switch.md +0 -49
- package/docs/reference/components/ui/TogglableGroup.md +0 -39
- package/docs/reference/components/ui/widgets/CopyCoordinates.md +0 -32
- package/docs/reference/components/ui/widgets/GeoSearch.md +0 -36
- package/docs/reference/components/ui/widgets/Legend.md +0 -58
- package/docs/reference/components/ui/widgets/LevelSelect.md +0 -16
- package/docs/reference/components/ui/widgets/MapFiltersButton.md +0 -37
- package/docs/reference/components/ui/widgets/MapLayersButton.md +0 -15
- package/docs/reference/components/ui/widgets/OSMEditors.md +0 -15
- package/docs/reference/components/ui/widgets/PictureLegendActions.md +0 -32
- package/docs/reference/components/ui/widgets/Player.md +0 -34
- package/docs/reference/components/ui/widgets/SemanticsFiltersButton.md +0 -15
- package/docs/reference/components/ui/widgets/Zoom.md +0 -15
- package/docs/reference/utils/API.md +0 -389
- package/docs/reference/utils/InitParameters.md +0 -68
- package/docs/reference/utils/MapStyleComposer.md +0 -408
- package/docs/reference/utils/PanoraMapProtocol.md +0 -28
- package/docs/reference/utils/PresetsManager.md +0 -43
- package/docs/reference/utils/SemanticsMapProtocol.md +0 -43
- package/docs/reference/utils/URLHandler.md +0 -114
- package/docs/reference.md +0 -99
- package/docs/shortcuts.md +0 -11
- package/docs/tutorials/aerial_imagery.md +0 -21
- package/docs/tutorials/authentication.md +0 -10
- package/docs/tutorials/custom_widgets.md +0 -59
- package/docs/tutorials/indoor_maps.md +0 -50
- package/docs/tutorials/map_style.md +0 -83
- package/docs/tutorials/migrate_v4.md +0 -153
- package/docs/tutorials/migrate_v5.md +0 -103
- package/docs/tutorials/semantics_overlays.md +0 -74
- package/docs/tutorials/synced_coverage.md +0 -43
- package/mkdocs.yml +0 -131
- package/public/editor.html +0 -53
- package/public/index.html +0 -70
- package/public/map.html +0 -55
- package/public/photo.html +0 -43
- package/public/servers.js +0 -15
- package/public/viewer.html +0 -79
- package/public/viewer_indoor.html +0 -48
- package/public/widgets.html +0 -366
- package/scripts/build.js +0 -217
- package/scripts/doc.js +0 -79
- package/scripts/start.js +0 -172
- package/scripts/test.js +0 -52
- package/src/components/core/index.js +0 -12
- package/src/components/index.js +0 -13
- package/src/components/index_photoviewer.js +0 -8
- package/src/components/layout/index.js +0 -9
- package/src/components/menus/index.js +0 -22
- package/src/components/menus/index_photoviewer.js +0 -13
- package/src/components/ui/index.js +0 -29
- package/src/components/ui/index_photoviewer.js +0 -23
- package/src/components/ui/widgets/index.js +0 -16
- package/src/components/ui/widgets/index_photoviewer.js +0 -9
- package/src/index.js +0 -8
- package/src/index_photoviewer.js +0 -6
- package/src/utils/index.js +0 -17
- package/src/utils/index_photoviewer.js +0 -16
- package/tests/components/core/Basic.test.js +0 -168
- package/tests/components/core/BasicMock.js +0 -25
- package/tests/components/core/CoverageMap.test.js +0 -20
- package/tests/components/core/Editor.test.js +0 -20
- package/tests/components/core/PhotoViewer.test.js +0 -57
- package/tests/components/core/Viewer.test.js +0 -85
- package/tests/components/core/__snapshots__/PhotoViewer.test.js.snap +0 -96
- package/tests/components/core/__snapshots__/Viewer.test.js.snap +0 -188
- package/tests/components/ui/CopyButton.test.js +0 -52
- package/tests/components/ui/Loader.test.js +0 -55
- package/tests/components/ui/Map.test.js +0 -145
- package/tests/components/ui/Photo.test.js +0 -437
- package/tests/components/ui/Popup.test.js +0 -26
- package/tests/components/ui/QualityScore.test.js +0 -18
- package/tests/components/ui/SearchBar.test.js +0 -110
- package/tests/components/ui/__snapshots__/CopyButton.test.js.snap +0 -33
- package/tests/components/ui/__snapshots__/Loader.test.js.snap +0 -56
- package/tests/components/ui/__snapshots__/Map.test.js.snap +0 -16
- package/tests/components/ui/__snapshots__/Photo.test.js.snap +0 -263
- package/tests/components/ui/__snapshots__/Popup.test.js.snap +0 -29
- package/tests/components/ui/__snapshots__/QualityScore.test.js.snap +0 -11
- package/tests/components/ui/__snapshots__/SearchBar.test.js.snap +0 -65
- package/tests/data/Map_geocoder_ban.json +0 -36
- package/tests/data/Map_geocoder_nominatim.json +0 -41
- package/tests/data/Viewer_pictures_1.json +0 -148
- package/tests/setupTests.js +0 -5
- package/tests/utils/API.test.js +0 -752
- package/tests/utils/InitParameters.test.js +0 -599
- package/tests/utils/MapStyleComposer.test.js +0 -697
- package/tests/utils/PresetsManager.test.js +0 -123
- package/tests/utils/URLHandler.test.js +0 -587
- package/tests/utils/__snapshots__/API.test.js.snap +0 -40
- package/tests/utils/__snapshots__/MapStyleComposer.test.js.snap +0 -767
- package/tests/utils/__snapshots__/URLHandler.test.js.snap +0 -21
- package/tests/utils/__snapshots__/geocoder.test.js.snap +0 -37
- package/tests/utils/__snapshots__/map.test.js.snap +0 -1249
- package/tests/utils/__snapshots__/picture.test.js.snap +0 -327
- package/tests/utils/__snapshots__/widgets.test.js.snap +0 -19
- package/tests/utils/geocoder.test.js +0 -37
- package/tests/utils/i18n.test.js +0 -111
- package/tests/utils/map.test.js +0 -200
- package/tests/utils/picture.test.js +0 -745
- package/tests/utils/semantics.test.js +0 -174
- package/tests/utils/utils.test.js +0 -358
- package/tests/utils/widgets.test.js +0 -31
- /package/{src → build}/components/core/Basic.css +0 -0
- /package/{src → build}/components/core/CoverageMap.css +0 -0
- /package/{src → build}/components/core/Editor.css +0 -0
- /package/{src → build}/components/core/PhotoViewer.css +0 -0
- /package/{src → build}/components/core/Viewer.css +0 -0
- /package/{src → build}/components/ui/ButtonGroup.css +0 -0
- /package/{src → build}/components/ui/Map.css +0 -0
- /package/{src → build}/components/ui/Photo.css +0 -0
- /package/{src → build}/components/ui/ProgressBar.js +0 -0
- /package/{src → build}/components/ui/widgets/GeoSearch.css +0 -0
- /package/{src → build}/components/ui/widgets/LevelSelect.css +0 -0
- /package/{src → build}/components/ui/widgets/Player.css +0 -0
- /package/{public → build}/favicon.ico +0 -0
- /package/{src → build}/img/arrow_360.svg +0 -0
- /package/{src → build}/img/arrow_flat.svg +0 -0
- /package/{src → build}/img/bg_aerial.jpg +0 -0
- /package/{src → build}/img/bg_streets.jpg +0 -0
- /package/{src → build}/img/loader_base.jpg +0 -0
- /package/{src → build}/img/logo_dead.svg +0 -0
- /package/{src → build}/img/marker.svg +0 -0
- /package/{src → build}/img/marker_blue.svg +0 -0
- /package/{src → build}/img/osm.svg +0 -0
- /package/{src → build}/img/panoramax.svg +0 -0
- /package/{src → build}/img/switch_big.svg +0 -0
- /package/{src → build}/img/switch_mini.svg +0 -0
- /package/{src → build}/img/wd.svg +0 -0
- /package/{src → build}/translations/ar.json +0 -0
- /package/{src → build}/translations/be.json +0 -0
- /package/{src → build}/translations/br.json +0 -0
- /package/{src → build}/translations/cy.json +0 -0
- /package/{src → build}/translations/da.json +0 -0
- /package/{src → build}/translations/de.json +0 -0
- /package/{src → build}/translations/en.json +0 -0
- /package/{src → build}/translations/eo.json +0 -0
- /package/{src → build}/translations/es.json +0 -0
- /package/{src → build}/translations/fi.json +0 -0
- /package/{src → build}/translations/fr.json +0 -0
- /package/{src → build}/translations/hu.json +0 -0
- /package/{src → build}/translations/it.json +0 -0
- /package/{src → build}/translations/ja.json +0 -0
- /package/{src → build}/translations/ko.json +0 -0
- /package/{src → build}/translations/nl.json +0 -0
- /package/{src → build}/translations/nn.json +0 -0
- /package/{src → build}/translations/pl.json +0 -0
- /package/{src → build}/translations/pt.json +0 -0
- /package/{src → build}/translations/pt_BR.json +0 -0
- /package/{src → build}/translations/sv.json +0 -0
- /package/{src → build}/translations/ti.json +0 -0
- /package/{src → build}/translations/tr.json +0 -0
- /package/{src → build}/translations/uk.json +0 -0
- /package/{src → build}/translations/zh_Hant.json +0 -0
- /package/{src → build}/utils/PanoraMapProtocol.js +0 -0
- /package/{src → build}/utils/services.js +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { LitElement, html } from "lit";
|
|
2
|
-
import API from "../../utils/API";
|
|
3
|
-
import { getTranslations } from "../../utils/i18n";
|
|
4
|
-
import { createWebComp } from "../../utils/widgets";
|
|
5
|
-
import { isInIframe, isInternetFast } from "../../utils/utils";
|
|
2
|
+
import API from "../../utils/API.js";
|
|
3
|
+
import { getTranslations } from "../../utils/i18n.js";
|
|
4
|
+
import { createWebComp } from "../../utils/widgets.js";
|
|
5
|
+
import { isInIframe, isInternetFast } from "../../utils/utils.js";
|
|
6
6
|
import JSON5 from "json5";
|
|
7
|
-
import PACKAGE_JSON from "../../../package.json";
|
|
8
|
-
import "
|
|
9
|
-
|
|
7
|
+
import PACKAGE_JSON from "../../../package.json" with { type: "json" };
|
|
8
|
+
import BasicStyles from "./Basic.css" with { type: "css" };
|
|
9
|
+
document.adoptedStyleSheets.push(BasicStyles);
|
|
10
|
+
|
|
11
|
+
const __COMMIT_HASH__ = "f91f675";
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Event for overlaying menu opening
|
|
@@ -97,7 +99,7 @@ export default class Basic extends LitElement {
|
|
|
97
99
|
console.error(`Component attribute "${k}" has been renamed into "${v}". Old attribute "${k}" is ignored.`);
|
|
98
100
|
}
|
|
99
101
|
});
|
|
100
|
-
|
|
102
|
+
|
|
101
103
|
if(isInIframe()) { this.classList.add("pnx-iframed"); }
|
|
102
104
|
}
|
|
103
105
|
|
|
@@ -124,7 +126,7 @@ export default class Basic extends LitElement {
|
|
|
124
126
|
});
|
|
125
127
|
this.api.onceReady()
|
|
126
128
|
.then(() => {
|
|
127
|
-
if(myLoadAPI
|
|
129
|
+
if(myLoadAPI !== this._loadsAPI || !this.api) { return; }
|
|
128
130
|
|
|
129
131
|
let unavailable = this.api.getUnavailableFeatures();
|
|
130
132
|
let available = this.api.getAvailableFeatures();
|
|
@@ -136,7 +138,7 @@ export default class Basic extends LitElement {
|
|
|
136
138
|
${unavailable}
|
|
137
139
|
`.trim());
|
|
138
140
|
})
|
|
139
|
-
.catch(e => this.loader
|
|
141
|
+
.catch(e => this.loader?.dismiss?.(e, this._t?.pnx.error_api))
|
|
140
142
|
.finally(() => delete this._loadsAPI);
|
|
141
143
|
}
|
|
142
144
|
catch(e) {
|
|
@@ -149,16 +151,17 @@ export default class Basic extends LitElement {
|
|
|
149
151
|
}
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
|
-
|
|
154
|
+
|
|
153
155
|
/**
|
|
154
156
|
* Waits for component to have its first loading done.
|
|
155
|
-
*
|
|
157
|
+
*
|
|
156
158
|
* Each inheriting class must override this method.
|
|
157
159
|
* @memberof Panoramax.components.core.Basic#
|
|
158
160
|
* @returns {Promise}
|
|
159
161
|
* @fulfil {null} When initialization is complete.
|
|
160
162
|
* @reject {string} Error message
|
|
161
163
|
*/
|
|
164
|
+
// eslint-disable-next-line class-methods-use-this
|
|
162
165
|
onceReady() {
|
|
163
166
|
throw new Error("You must override this method on sub-class");
|
|
164
167
|
}
|
|
@@ -187,7 +190,7 @@ export default class Basic extends LitElement {
|
|
|
187
190
|
/** @private */
|
|
188
191
|
attributeChangedCallback(name, _old, value) {
|
|
189
192
|
super.attributeChangedCallback(name, _old, value);
|
|
190
|
-
|
|
193
|
+
|
|
191
194
|
if(name === "endpoint") {
|
|
192
195
|
if(
|
|
193
196
|
!(this._loadsAPI && value && this._loadsAPI === value)
|
|
@@ -242,11 +245,12 @@ export default class Basic extends LitElement {
|
|
|
242
245
|
/**
|
|
243
246
|
* This allows to retrieve an always correct class name.
|
|
244
247
|
* This is crap, but avoids issues with Webpack & so on.
|
|
245
|
-
*
|
|
248
|
+
*
|
|
246
249
|
* Each inheriting class must override this method.
|
|
247
250
|
* @returns {string} The class name (for example "Basic")
|
|
248
251
|
* @memberof Panoramax.components.core.Basic#
|
|
249
252
|
*/
|
|
253
|
+
// eslint-disable-next-line class-methods-use-this
|
|
250
254
|
getClassName() {
|
|
251
255
|
return "Basic";
|
|
252
256
|
}
|
|
@@ -296,6 +300,7 @@ export default class Basic extends LitElement {
|
|
|
296
300
|
}
|
|
297
301
|
|
|
298
302
|
/** @private */
|
|
303
|
+
// eslint-disable-next-line class-methods-use-this
|
|
299
304
|
render() {
|
|
300
305
|
return html`<p>Should not be used directly, use Viewer/CoverageMap/Editor instead</p>`;
|
|
301
306
|
}
|
|
@@ -305,6 +310,7 @@ export default class Basic extends LitElement {
|
|
|
305
310
|
* @returns {string[]} Sub-components names.
|
|
306
311
|
* @memberof Panoramax.components.core.Basic#
|
|
307
312
|
*/
|
|
313
|
+
// eslint-disable-next-line class-methods-use-this
|
|
308
314
|
getSubComponentsNames() {
|
|
309
315
|
return ["loader", "api"];
|
|
310
316
|
}
|
|
@@ -320,9 +326,9 @@ export default class Basic extends LitElement {
|
|
|
320
326
|
|
|
321
327
|
/**
|
|
322
328
|
* Listen to events from this components or one of its sub-components.
|
|
323
|
-
*
|
|
329
|
+
*
|
|
324
330
|
* For example, you can listen to `map` events using prefix `map:`.
|
|
325
|
-
*
|
|
331
|
+
*
|
|
326
332
|
* ```js
|
|
327
333
|
* me.addEventListener("map:move", doSomething);
|
|
328
334
|
* ```
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import Basic from "./Basic";
|
|
2
|
-
import Map from "../ui/Map";
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
import Basic from "./Basic.js";
|
|
2
|
+
import Map from "../ui/Map.js";
|
|
3
|
+
import "maplibre-gl";
|
|
4
|
+
import { default as InitParameters, alterMapState } from "../../utils/InitParameters.js";
|
|
5
|
+
import { MapTiles } from "../../utils/services.js";
|
|
6
|
+
import MapStyleComposer from "../../utils/MapStyleComposer.js";
|
|
7
|
+
import CoverageMapStyles from "./CoverageMap.css" with { type: "css" };
|
|
8
|
+
document.adoptedStyleSheets.push(CoverageMapStyles);
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Coverage Map is a basic map showing Panoramax coverage.
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
13
|
* Make sure to set width/height through CSS for proper display.
|
|
14
14
|
* @class Panoramax.components.core.CoverageMap
|
|
15
15
|
* @element pnx-coverage-map
|
|
@@ -56,11 +56,11 @@ export default class CoverageMap extends Basic {
|
|
|
56
56
|
super();
|
|
57
57
|
|
|
58
58
|
this["map-style"] = this.getAttribute("map-style") || MapTiles();
|
|
59
|
-
|
|
59
|
+
|
|
60
60
|
// Check if mapstyle is not a unparsed JSON
|
|
61
61
|
try {
|
|
62
62
|
this["map-style"] = JSON.parse(this["map-style"]);
|
|
63
|
-
} catch(e) { /*
|
|
63
|
+
} catch(e) { /* Empty */ }
|
|
64
64
|
|
|
65
65
|
// Setup map styles and sources
|
|
66
66
|
this.mapStyleComposer = new MapStyleComposer(this);
|
|
@@ -70,6 +70,7 @@ export default class CoverageMap extends Basic {
|
|
|
70
70
|
this.onceAPIReady().then(() => {
|
|
71
71
|
this.loader.setAttribute("value", 30);
|
|
72
72
|
this._initParams = new InitParameters(InitParameters.GetComponentProperties(CoverageMap, this));
|
|
73
|
+
// eslint-disable-next-line eqeqeq
|
|
73
74
|
const singleUser = this.user && this.user != "";
|
|
74
75
|
this.mapStyleComposer._createPanoramaxEndpointFromAPI("default", this.api, !singleUser);
|
|
75
76
|
if(singleUser) {
|
|
@@ -84,6 +85,7 @@ export default class CoverageMap extends Basic {
|
|
|
84
85
|
super.attributeChangedCallback(name, _old, value);
|
|
85
86
|
|
|
86
87
|
if(name === "user" && this.api?._isReady === 1) {
|
|
88
|
+
// eslint-disable-next-line eqeqeq
|
|
87
89
|
if(value && value != "") {
|
|
88
90
|
this.mapStyleComposer._createPanoramaxEndpointForUser(value);
|
|
89
91
|
}
|
|
@@ -99,6 +101,7 @@ export default class CoverageMap extends Basic {
|
|
|
99
101
|
this.map?.destroy();
|
|
100
102
|
}
|
|
101
103
|
|
|
104
|
+
// eslint-disable-next-line class-methods-use-this
|
|
102
105
|
getClassName() {
|
|
103
106
|
return "CoverageMap";
|
|
104
107
|
}
|
|
@@ -127,15 +130,16 @@ export default class CoverageMap extends Basic {
|
|
|
127
130
|
*/
|
|
128
131
|
_initMap() {
|
|
129
132
|
this.map = new Map(this, this._mapContainer, Object.assign({}, this._initParams.getMapInit(), { hash: true }));
|
|
130
|
-
|
|
133
|
+
// eslint-disable-next-line no-undef
|
|
134
|
+
this.map.addControl(new maplibregl.NavigationControl({ showCompass: false }));
|
|
131
135
|
this.loader.setAttribute("value", 70);
|
|
132
136
|
|
|
133
137
|
this.addEventListener("select", this._onSelect.bind(this));
|
|
134
138
|
this.map.on("picture-click", e => this.select(e.seqId, e.picId));
|
|
135
139
|
this.map.on("sequence-click", e => this.select(e.seqId));
|
|
136
140
|
|
|
137
|
-
this.map.waitForEnoughMapLoaded().then(
|
|
138
|
-
|
|
141
|
+
this.map.waitForEnoughMapLoaded().then(() => {
|
|
142
|
+
alterMapState(this.map, this._initParams.getMapPostInit());
|
|
139
143
|
this.loader.dismiss();
|
|
140
144
|
});
|
|
141
145
|
}
|
|
@@ -154,6 +158,7 @@ export default class CoverageMap extends Basic {
|
|
|
154
158
|
filter: ["==", ["get", "id"], e.detail.picId || e.detail.seqId]
|
|
155
159
|
});
|
|
156
160
|
|
|
161
|
+
// eslint-disable-next-line eqeqeq
|
|
157
162
|
if(features.length >= 0 && features[0] != null) {
|
|
158
163
|
this.map._attachPreviewToPictures({ features }, layer);
|
|
159
164
|
}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { apiFeatureToPSVNode } from "../../utils/picture";
|
|
7
|
-
import { linkMapAndPhoto } from "../../utils/map";
|
|
8
|
-
import { VECTOR_STYLES_NOCROWD as VECTOR_STYLES } from "../../utils/map";
|
|
1
|
+
import Basic from "./Basic.js";
|
|
2
|
+
import Map from "../ui/Map.js";
|
|
3
|
+
import Photo from "../ui/Photo.js";
|
|
4
|
+
import { apiFeatureToPSVNode } from "../../utils/picture.js";
|
|
5
|
+
import { linkMapAndPhoto } from "../../utils/map.js";
|
|
9
6
|
import { SYSTEM as PSSystem } from "@photo-sphere-viewer/core";
|
|
10
|
-
import { createWebComp } from "../../utils/widgets";
|
|
11
|
-
import MapStyleComposer from "../../utils/MapStyleComposer";
|
|
12
|
-
import { MapTiles } from "../../utils/services";
|
|
7
|
+
import { createWebComp } from "../../utils/widgets.js";
|
|
8
|
+
import MapStyleComposer from "../../utils/MapStyleComposer.js";
|
|
9
|
+
import { MapTiles } from "../../utils/services.js";
|
|
10
|
+
import EditorStyles from "./Editor.css" with { type: "css" };
|
|
11
|
+
document.adoptedStyleSheets.push(EditorStyles);
|
|
13
12
|
|
|
14
13
|
const LAYER_HEADING_ID = "sequence-headings";
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Editor allows to focus on a single sequence, and preview what you edits would look like.
|
|
18
17
|
* It shows both picture and map.
|
|
19
|
-
*
|
|
18
|
+
*
|
|
20
19
|
* Make sure to set width/height through CSS for proper display.
|
|
21
|
-
*
|
|
20
|
+
*
|
|
22
21
|
* This component has a [CorneredGrid](#Panoramax.components.layout.CorneredGrid) layout, you can use directly any slot element to pass custom widgets.
|
|
23
22
|
* @class Panoramax.components.core.Editor
|
|
24
23
|
* @element pnx-editor
|
|
@@ -45,7 +44,7 @@ const LAYER_HEADING_ID = "sequence-headings";
|
|
|
45
44
|
* endpoint="https://panoramax.openstreetmap.fr/"
|
|
46
45
|
* style="width: 300px; height: 250px"
|
|
47
46
|
* />
|
|
48
|
-
*
|
|
47
|
+
*
|
|
49
48
|
* <!-- With slotted widgets -->
|
|
50
49
|
* <pnx-editor
|
|
51
50
|
* endpoint="https://panoramax.openstreetmap.fr/"
|
|
@@ -87,7 +86,7 @@ export default class Editor extends Basic {
|
|
|
87
86
|
// Check if mapstyle is not a unparsed JSON
|
|
88
87
|
try {
|
|
89
88
|
this["map-style"] = JSON.parse(this["map-style"]);
|
|
90
|
-
} catch(e) { /*
|
|
89
|
+
} catch(e) { /* Empty */ }
|
|
91
90
|
|
|
92
91
|
// Setup map styles and sources
|
|
93
92
|
this.mapStyleComposer = new MapStyleComposer(this);
|
|
@@ -124,6 +123,7 @@ export default class Editor extends Basic {
|
|
|
124
123
|
this.psv?.destroy();
|
|
125
124
|
}
|
|
126
125
|
|
|
126
|
+
// eslint-disable-next-line class-methods-use-this
|
|
127
127
|
getClassName() {
|
|
128
128
|
return "Editor";
|
|
129
129
|
}
|
|
@@ -283,7 +283,7 @@ export default class Editor extends Basic {
|
|
|
283
283
|
|
|
284
284
|
/**
|
|
285
285
|
* Get the PSV node for wanted picture.
|
|
286
|
-
*
|
|
286
|
+
*
|
|
287
287
|
* @param {string} picId The picture ID
|
|
288
288
|
* @returns The PSV node
|
|
289
289
|
* @private
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
import PresetManager from "../../utils/PresetsManager";
|
|
13
|
-
import { querySelectorDeep } from "query-selector-shadow-dom";
|
|
1
|
+
import { DEFAULTS as PSDefaults, SYSTEM as PSSystem } from "@photo-sphere-viewer/core";
|
|
2
|
+
import URLHandler from "../../utils/URLHandler.js";
|
|
3
|
+
import Basic from "./Basic.js";
|
|
4
|
+
import Photo, { PSV_ANIM_DURATION, PSV_DEFAULT_ZOOM } from "../ui/Photo.js";
|
|
5
|
+
import { createWebComp } from "../../utils/widgets.js";
|
|
6
|
+
import { DISABLE_ANNOTATIONS_PARAM, isInIframe, isNullId } from "../../utils/utils.js";
|
|
7
|
+
import { default as InitParameters, alterPSVState, alterPhotoViewerState } from "../../utils/InitParameters.js";
|
|
8
|
+
import PresetManager from "../../utils/PresetsManager.js";
|
|
9
|
+
import "query-selector-shadow-dom";
|
|
10
|
+
import PhotoViewerStyles from "./PhotoViewer.css" with { type: "css" };
|
|
11
|
+
document.adoptedStyleSheets.push(PhotoViewerStyles);
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
export const PSV_ZOOM_DELTA = 20;
|
|
@@ -20,11 +18,11 @@ export const KEYBOARD_SKIP_FOCUS_WIDGETS = ["pnx-mini", "pnx-widget-player", "pn
|
|
|
20
18
|
|
|
21
19
|
/**
|
|
22
20
|
* Photo Viewer is a component showing pictures (without any map).
|
|
23
|
-
*
|
|
21
|
+
*
|
|
24
22
|
* This component has a [CorneredGrid](#Panoramax.components.layout.CorneredGrid) layout, you can use directly any slot element to pass custom widgets.
|
|
25
|
-
*
|
|
23
|
+
*
|
|
26
24
|
* If you need a viewer with map, checkout [Viewer component](#Panoramax.components.core.Viewer).
|
|
27
|
-
*
|
|
25
|
+
*
|
|
28
26
|
* Make sure to set width/height through CSS for proper display.
|
|
29
27
|
* @class Panoramax.components.core.PhotoViewer
|
|
30
28
|
* @element pnx-photo-viewer
|
|
@@ -53,7 +51,7 @@ export const KEYBOARD_SKIP_FOCUS_WIDGETS = ["pnx-mini", "pnx-widget-player", "pn
|
|
|
53
51
|
* endpoint="https://panoramax.openstreetmap.fr/"
|
|
54
52
|
* style="width: 300px; height: 250px"
|
|
55
53
|
* />
|
|
56
|
-
*
|
|
54
|
+
*
|
|
57
55
|
* <!-- With slotted widgets -->
|
|
58
56
|
* <pnx-photo-viewer
|
|
59
57
|
* endpoint="https://panoramax.openstreetmap.fr/"
|
|
@@ -62,7 +60,7 @@ export const KEYBOARD_SKIP_FOCUS_WIDGETS = ["pnx-mini", "pnx-widget-player", "pn
|
|
|
62
60
|
* <p slot="top-right">My custom text</p>
|
|
63
61
|
* <p slot="editors"><a href="https://my.own.tool/">Edit in my own tool</a></p>
|
|
64
62
|
* </pnx-photo-viewer>
|
|
65
|
-
*
|
|
63
|
+
*
|
|
66
64
|
* <!-- With only your custom widgets -->
|
|
67
65
|
* <pnx-photo-viewer
|
|
68
66
|
* endpoint="https://panoramax.openstreetmap.fr/"
|
|
@@ -171,7 +169,7 @@ export default class PhotoViewer extends Basic {
|
|
|
171
169
|
focus: this._initParams.getParentPostInit().focus,
|
|
172
170
|
picture: this._initParams.getParentPostInit().picture,
|
|
173
171
|
});
|
|
174
|
-
|
|
172
|
+
|
|
175
173
|
this.grid.appendChild(createWebComp("pnx-widget-zoom", {
|
|
176
174
|
slot: "bottom-right",
|
|
177
175
|
class: "pnx-print-hidden",
|
|
@@ -227,6 +225,7 @@ export default class PhotoViewer extends Basic {
|
|
|
227
225
|
window.removeEventListener("keypress", this._toggleKeyboardBasedOnFocus);
|
|
228
226
|
}
|
|
229
227
|
|
|
228
|
+
// eslint-disable-next-line class-methods-use-this
|
|
230
229
|
getClassName() {
|
|
231
230
|
return "PhotoViewer";
|
|
232
231
|
}
|
|
@@ -236,8 +235,8 @@ export default class PhotoViewer extends Basic {
|
|
|
236
235
|
* @returns {Promise} When viewer is ready
|
|
237
236
|
* @memberof Panoramax.components.core.PhotoViewer#
|
|
238
237
|
*/
|
|
239
|
-
onceReady() {
|
|
240
|
-
return this.oncePSVReady().then(() => {
|
|
238
|
+
async onceReady() {
|
|
239
|
+
return await this.oncePSVReady().then(() => {
|
|
241
240
|
if(this._initParams.getParentPostInit().willLoadPicture && !this.psv.getPictureMetadata()) { return this.onceFirstPicLoaded(); }
|
|
242
241
|
else { return Promise.resolve(); }
|
|
243
242
|
});
|
|
@@ -295,7 +294,7 @@ export default class PhotoViewer extends Basic {
|
|
|
295
294
|
}
|
|
296
295
|
|
|
297
296
|
/** @private */
|
|
298
|
-
|
|
297
|
+
_postAPIInit() {
|
|
299
298
|
this.loader.setAttribute("value", 30);
|
|
300
299
|
this._createInitParamsHandler();
|
|
301
300
|
|
|
@@ -304,11 +303,11 @@ export default class PhotoViewer extends Basic {
|
|
|
304
303
|
this._initPSV();
|
|
305
304
|
this._initWidgets();
|
|
306
305
|
alterPhotoViewerState(this, myPostInitParams);
|
|
307
|
-
|
|
306
|
+
|
|
308
307
|
if(myPostInitParams.keyboardShortcuts) {
|
|
309
308
|
this._handleKeyboardManagement();
|
|
310
309
|
}
|
|
311
|
-
|
|
310
|
+
|
|
312
311
|
if(myPostInitParams.willLoadPicture) {
|
|
313
312
|
if(this.psv.getPictureMetadata()) {
|
|
314
313
|
this.loader.dismiss();
|
|
@@ -368,7 +367,7 @@ export default class PhotoViewer extends Basic {
|
|
|
368
367
|
this.psv.addEventListener("dblclick", () => clearTimeout(this._gridFocus));
|
|
369
368
|
this.psv.addEventListener("click", e => {
|
|
370
369
|
clearTimeout(this._gridFocus);
|
|
371
|
-
|
|
370
|
+
|
|
372
371
|
if(e.data.target.tagName === "CANVAS") {
|
|
373
372
|
if(!this._hasMenuOpened() && (!this.isMapWide || (this.isMapWide && !this.isMapWide()))) {
|
|
374
373
|
this._gridFocus = setTimeout(() => {
|
|
@@ -397,8 +396,10 @@ export default class PhotoViewer extends Basic {
|
|
|
397
396
|
}
|
|
398
397
|
|
|
399
398
|
/** @private */
|
|
399
|
+
// eslint-disable-next-line class-methods-use-this
|
|
400
400
|
_hasMenuOpened() {
|
|
401
|
-
|
|
401
|
+
// eslint-disable-next-line eqeqeq, no-undef
|
|
402
|
+
return querySelectorShadowDom("pnx-togglable-group > div > .pnx-panel:not(.pnx-hidden)") != null;
|
|
402
403
|
}
|
|
403
404
|
|
|
404
405
|
/** @private */
|
|
@@ -507,7 +508,7 @@ export default class PhotoViewer extends Basic {
|
|
|
507
508
|
setPopup(visible, content = null) {
|
|
508
509
|
if(visible) { this.popup.setAttribute("visible", ""); }
|
|
509
510
|
else { this.popup.removeAttribute("visible"); }
|
|
510
|
-
|
|
511
|
+
|
|
511
512
|
this.popup.innerHTML = "";
|
|
512
513
|
if(typeof content === "string") { this.popup.innerHTML = content; }
|
|
513
514
|
else if(Array.isArray(content)) { content.forEach(c => this.popup.appendChild(c)); }
|
|
@@ -630,9 +631,9 @@ export default class PhotoViewer extends Basic {
|
|
|
630
631
|
|
|
631
632
|
/**
|
|
632
633
|
* Listen to events from this components or one of its sub-components.
|
|
633
|
-
*
|
|
634
|
+
*
|
|
634
635
|
* For example, you can listen to `psv` events using prefix `psv:`.
|
|
635
|
-
*
|
|
636
|
+
*
|
|
636
637
|
* ```js
|
|
637
638
|
* me.addEventListener("psv:picture-loading", doSomething);
|
|
638
639
|
* ```
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import { MapTiles } from "../../utils/services";
|
|
14
|
-
import API from "../../utils/API";
|
|
1
|
+
import { getMapParamsFromLocalStorage, linkMapAndPhoto, saveMapParamsToLocalStorage, initMapKeyboardHandler } from "../../utils/map.js";
|
|
2
|
+
import PhotoViewer, {KEYBOARD_SKIP_FOCUS_WIDGETS} from "./PhotoViewer.js";
|
|
3
|
+
import MapMore from "../ui/MapMore.js";
|
|
4
|
+
import { DISABLE_ANNOTATIONS_PARAM, isInIframe, isNullId } from "../../utils/utils.js";
|
|
5
|
+
import { createWebComp, fa } from "../../utils/widgets.js";
|
|
6
|
+
import { PanoramaxMetaCatalogURL, MapTiles } from "../../utils/services.js";
|
|
7
|
+
import { faMap, faPanorama } from "@fortawesome/free-solid-svg-icons";
|
|
8
|
+
import { default as InitParameters, alterMapState, alterViewerState } from "../../utils/InitParameters.js";
|
|
9
|
+
import MapStyleComposer from "../../utils/MapStyleComposer.js";
|
|
10
|
+
import API from "../../utils/API.js";
|
|
11
|
+
import ViewerStyles from "./Viewer.css" with { type: "css" };
|
|
12
|
+
document.adoptedStyleSheets.push(ViewerStyles);
|
|
15
13
|
|
|
16
14
|
|
|
17
15
|
const MAP_MOVE_DELTA = 100;
|
|
@@ -137,7 +135,7 @@ export default class Viewer extends PhotoViewer {
|
|
|
137
135
|
// Check if mapstyle is not a unparsed JSON
|
|
138
136
|
try {
|
|
139
137
|
this["map-style"] = JSON.parse(this["map-style"]);
|
|
140
|
-
} catch(e) { /*
|
|
138
|
+
} catch(e) { /* Empty */ }
|
|
141
139
|
|
|
142
140
|
// Init DOM containers
|
|
143
141
|
this.mini = createWebComp("pnx-mini", {
|
|
@@ -269,6 +267,7 @@ export default class Viewer extends PhotoViewer {
|
|
|
269
267
|
this.map?.destroy();
|
|
270
268
|
}
|
|
271
269
|
|
|
270
|
+
// eslint-disable-next-line class-methods-use-this
|
|
272
271
|
getClassName() {
|
|
273
272
|
return "Viewer";
|
|
274
273
|
}
|
|
@@ -343,6 +342,7 @@ export default class Viewer extends PhotoViewer {
|
|
|
343
342
|
// Check if it's not first load from seq=* URL parameter
|
|
344
343
|
else if(
|
|
345
344
|
isNullId(old)
|
|
345
|
+
// eslint-disable-next-line eqeqeq
|
|
346
346
|
&& this.sequence == this._initParams.getParentPostInit().sequence
|
|
347
347
|
&& !this._initParams.getParentPostInit().picture
|
|
348
348
|
) {
|
|
@@ -425,6 +425,7 @@ export default class Viewer extends PhotoViewer {
|
|
|
425
425
|
* @memberof Panoramax.components.core.Viewer#
|
|
426
426
|
*/
|
|
427
427
|
hasTwoAPIs() {
|
|
428
|
+
// eslint-disable-next-line eqeqeq
|
|
428
429
|
return (this.apiMC != undefined && this.api != undefined) || this.metacatalog !== "false";
|
|
429
430
|
}
|
|
430
431
|
|
|
@@ -595,7 +596,7 @@ export default class Viewer extends PhotoViewer {
|
|
|
595
596
|
* @returns {boolean} True if map is wider than viewer
|
|
596
597
|
*/
|
|
597
598
|
isMapWide() {
|
|
598
|
-
return this.mapContainer.parentNode
|
|
599
|
+
return this.mapContainer.parentNode === this.grid;
|
|
599
600
|
}
|
|
600
601
|
|
|
601
602
|
/**
|
|
@@ -619,13 +620,13 @@ export default class Viewer extends PhotoViewer {
|
|
|
619
620
|
|
|
620
621
|
if(focus === "map") {
|
|
621
622
|
// Remove PSV from grid
|
|
622
|
-
if(this.psvContainer.parentNode
|
|
623
|
+
if(this.psvContainer.parentNode === this.grid) {
|
|
623
624
|
this.grid.removeChild(this.psvContainer);
|
|
624
625
|
this.psvContainer.removeAttribute("slot");
|
|
625
626
|
}
|
|
626
627
|
|
|
627
628
|
// Remove map from mini
|
|
628
|
-
if(this.mapContainer.parentNode
|
|
629
|
+
if(this.mapContainer.parentNode === this.mini) {
|
|
629
630
|
this.mini.removeChild(this.mapContainer);
|
|
630
631
|
}
|
|
631
632
|
|
|
@@ -646,13 +647,13 @@ export default class Viewer extends PhotoViewer {
|
|
|
646
647
|
}
|
|
647
648
|
else {
|
|
648
649
|
// Remove map from grid
|
|
649
|
-
if(this.mapContainer.parentNode
|
|
650
|
+
if(this.mapContainer.parentNode === this.grid) {
|
|
650
651
|
this.grid.removeChild(this.mapContainer);
|
|
651
652
|
this.mapContainer.removeAttribute("slot");
|
|
652
653
|
}
|
|
653
654
|
|
|
654
655
|
// Remove PSV from mini
|
|
655
|
-
if(this.psvContainer.parentNode
|
|
656
|
+
if(this.psvContainer.parentNode === this.mini) {
|
|
656
657
|
this.mini.removeChild(this.psvContainer);
|
|
657
658
|
if(this._miniPicLegend) { this.mini.removeChild(this._miniPicLegend); }
|
|
658
659
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core graphical components
|
|
3
|
+
* @module Panoramax:components:core
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export {default as Basic} from "./Basic.js";
|
|
7
|
+
export {default as CoverageMap} from "./CoverageMap.js";
|
|
8
|
+
export {default as Editor} from "./Editor.js";
|
|
9
|
+
export {default as Viewer} from "./Viewer.js";
|
|
10
|
+
export {default as PhotoViewer} from "./PhotoViewer.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graphical components
|
|
3
|
+
* @module Panoramax:components
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as core from "./core/index.js";
|
|
7
|
+
import * as layout from "./layout/index.js";
|
|
8
|
+
import * as menus from "./menus/index.js";
|
|
9
|
+
import * as ui from "./ui/index.js";
|
|
10
|
+
|
|
11
|
+
export {core, layout, menus, ui};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LitElement,
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
2
|
import { classMap } from "lit/directives/class-map.js";
|
|
3
|
-
import { onceParentAvailable } from "../../utils/widgets";
|
|
3
|
+
import { onceParentAvailable } from "../../utils/widgets.js";
|
|
4
4
|
|
|
5
5
|
const OPENNESS_Y_PCT = { "opened": 0, "half-opened": 0.7, "closed": 1 };
|
|
6
6
|
|
|
@@ -159,12 +159,12 @@ export default class BottomDrawer extends LitElement {
|
|
|
159
159
|
|
|
160
160
|
/** @private */
|
|
161
161
|
_onTouchMove(e) {
|
|
162
|
-
if (!this._isDragging) return;
|
|
162
|
+
if (!this._isDragging) {return;}
|
|
163
163
|
|
|
164
164
|
// Check if content has scroll bar, then only move if top scrolled
|
|
165
165
|
const content = this.shadowRoot.querySelector(".content");
|
|
166
166
|
if(content.scrollHeight > content.offsetHeight && content.scrollTop > 0) {
|
|
167
|
-
this._updateDrawerTransform(0);
|
|
167
|
+
this._updateDrawerTransform(0);
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
170
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { LitElement,
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
|
+
|
|
3
|
+
const SwitchBig = new URL("../../img/switch_big.svg", import.meta.url).href;
|
|
4
|
+
const SwitchMini = new URL("../../img/switch_mini.svg", import.meta.url).href;
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Mini layout allows to show a reduced or collapsed component in a corner of a main component.
|
|
@@ -77,7 +78,7 @@ export default class Mini extends LitElement {
|
|
|
77
78
|
* @type {Event}
|
|
78
79
|
*/
|
|
79
80
|
const onExpand = () => this.dispatchEvent(new Event("expand", {bubbles: true, composed: true}));
|
|
80
|
-
|
|
81
|
+
|
|
81
82
|
if(this.collapsed || isSmall) {
|
|
82
83
|
const click = isSmall ? onExpand : () => this.collapsed = false;
|
|
83
84
|
return html`<pnx-button
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* General layout components
|
|
3
|
+
* @module Panoramax:components:layout
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export {default as BottomDrawer} from "./BottomDrawer.js";
|
|
7
|
+
export {default as CorneredGrid} from "./CorneredGrid.js";
|
|
8
|
+
export {default as Mini} from "./Mini.js";
|
|
9
|
+
export {default as Tabs} from "./Tabs.js";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { LitElement, html } from "lit";
|
|
2
|
-
import { faSvg, titles
|
|
3
|
-
import { fa } from "../../utils/widgets";
|
|
4
|
-
import { faMapMarkerAlt } from "@fortawesome/free-solid-svg-icons
|
|
5
|
-
import {
|
|
6
|
-
import { QUALITYSCORE_GPS_VALUES } from "../../utils/utils";
|
|
2
|
+
import { docPopup, faSvg, titles } from "../styles.js";
|
|
3
|
+
import { fa } from "../../utils/widgets.js";
|
|
4
|
+
import { faExternalLinkAlt, faMapMarkerAlt } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
import { QUALITYSCORE_GPS_VALUES } from "../../utils/utils.js";
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Location Precision Doc displays a synthetic summary of how Location Precision filter and map theme works.
|
|
@@ -19,7 +18,6 @@ export default class LocationPrecisionDoc extends LitElement {
|
|
|
19
18
|
static styles = [ titles, faSvg, docPopup ];
|
|
20
19
|
|
|
21
20
|
render() {
|
|
22
|
-
/* eslint-disable indent */
|
|
23
21
|
return html`
|
|
24
22
|
<h4>${fa(faMapMarkerAlt)} ${this._t?.pnx.filter_gps_precision}</h4>
|
|
25
23
|
<p>${this._t?.pnx.filter_gps_precision_help_1}</p>
|