@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,11 +1,10 @@
|
|
|
1
|
-
import { LitElement,
|
|
2
|
-
import { fa, onceParentAvailable } from "../../utils/widgets";
|
|
3
|
-
import { faTags } from "@fortawesome/free-solid-svg-icons
|
|
4
|
-
import {
|
|
5
|
-
import { hasAnnotations } from "../../utils/picture";
|
|
1
|
+
import { LitElement, css, html, nothing } from "lit";
|
|
2
|
+
import { fa, onceParentAvailable } from "../../utils/widgets.js";
|
|
3
|
+
import { faTags, faTriangleExclamation } from "@fortawesome/free-solid-svg-icons";
|
|
4
|
+
import { hasAnnotations } from "../../utils/picture.js";
|
|
6
5
|
import { classMap } from "lit/directives/class-map.js";
|
|
7
|
-
import { panel } from "../styles";
|
|
8
|
-
import { DISABLE_ANNOTATIONS_PARAM } from "../../utils/utils";
|
|
6
|
+
import { panel } from "../styles.js";
|
|
7
|
+
import { DISABLE_ANNOTATIONS_PARAM } from "../../utils/utils.js";
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* AnnotationsSwitch component allows to switch on/off pictures annotations.
|
|
@@ -129,7 +128,6 @@ export default class AnnotationsSwitch extends LitElement {
|
|
|
129
128
|
|
|
130
129
|
/** @private */
|
|
131
130
|
render() {
|
|
132
|
-
/* eslint-disable indent */
|
|
133
131
|
const panelClasses = {
|
|
134
132
|
"pnx-panel": true,
|
|
135
133
|
"pnx-hidden": !this._warnNoAnnotTooltip,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, css, html } from "lit";
|
|
2
|
-
import "./ButtonGroup.css";
|
|
2
|
+
import ButtonGroupStyles from "./ButtonGroup.css" with { type: "css" };
|
|
3
|
+
document.adoptedStyleSheets.push(ButtonGroupStyles);
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Button Group element allows to merge many button in a single bar.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { LitElement,
|
|
2
|
-
import { fa } from "../../utils/widgets";
|
|
3
|
-
import { faCheck } from "@fortawesome/free-solid-svg-icons
|
|
4
|
-
import {
|
|
5
|
-
import { btn, faSvg } from "../styles";
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
|
+
import { fa } from "../../utils/widgets.js";
|
|
3
|
+
import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";
|
|
4
|
+
import { btn, faSvg } from "../styles.js";
|
|
6
5
|
import { classMap } from "lit/directives/class-map.js";
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -91,7 +90,6 @@ export default class CopyButton extends LitElement {
|
|
|
91
90
|
|
|
92
91
|
/** @private */
|
|
93
92
|
render() {
|
|
94
|
-
/* eslint-disable indent */
|
|
95
93
|
const classes = {
|
|
96
94
|
"pnx-btn": !this.unstyled,
|
|
97
95
|
"pnx-btn-full": !this.unstyled,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LitElement,
|
|
2
|
-
import { fa } from "../../utils/widgets";
|
|
3
|
-
import { faStar } from "@fortawesome/free-solid-svg-icons
|
|
4
|
-
import { faStar as farStar } from "@fortawesome/free-regular-svg-icons
|
|
5
|
-
import { faSvg } from "../styles";
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
|
+
import { fa } from "../../utils/widgets.js";
|
|
3
|
+
import { faStar } from "@fortawesome/free-solid-svg-icons";
|
|
4
|
+
import { faStar as farStar } from "@fortawesome/free-regular-svg-icons";
|
|
5
|
+
import { faSvg } from "../styles.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Grade element displays a 5-star rating.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LitElement,
|
|
2
|
-
import { fa } from "../../utils/widgets";
|
|
3
|
-
import { faStar } from "@fortawesome/free-solid-svg-icons
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
|
+
import { fa } from "../../utils/widgets.js";
|
|
3
|
+
import { faStar } from "@fortawesome/free-solid-svg-icons";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Grade Filter allows to filter picture by their grade (for example, precision grade)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LitElement,
|
|
2
|
-
import { panel } from "../styles";
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
|
+
import { panel } from "../styles.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* List Group element displays a menu having a list of rapid actions (links, buttons).
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
7
|
* Note that you may only want to use basic HTML elements (`a`, `button`) instead of Panoramax ones.
|
|
8
8
|
* The list group overrides style, so using `pnx-*` component may conflict on styling.
|
|
9
9
|
* @class Panoramax.components.ui.ListGroup
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { LitElement, html,
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { LitElement, css, html, nothing, unsafeCSS } from "lit";
|
|
2
|
+
import { inRangeRandom } from "../../utils/utils.js";
|
|
3
|
+
|
|
4
|
+
const LogoDead = new URL("../../img/logo_dead.svg", import.meta.url).href;
|
|
5
|
+
const LoaderBg = new URL("../../img/loader_base.jpg", import.meta.url).href;
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Loader component display a full page covering for user waiting.
|
|
@@ -27,7 +28,7 @@ export default class Loader extends LitElement {
|
|
|
27
28
|
background-image: url('${unsafeCSS(LoaderBg)}');
|
|
28
29
|
background-repeat: no-repeat;
|
|
29
30
|
background-size: cover;
|
|
30
|
-
background-position: center;
|
|
31
|
+
background-position: center;
|
|
31
32
|
z-index: 200;
|
|
32
33
|
font-family: var(--font-family);
|
|
33
34
|
font-weight: 550;
|
|
@@ -115,7 +116,7 @@ export default class Loader extends LitElement {
|
|
|
115
116
|
/**
|
|
116
117
|
* Event when component is ready to use.
|
|
117
118
|
* This happens when loader screen disappear, with picture and map loaded.
|
|
118
|
-
*
|
|
119
|
+
*
|
|
119
120
|
* To follow more precisely loading steps, you can also watch for sub-components `ready` events.
|
|
120
121
|
* ```js
|
|
121
122
|
* // Watch API-readiness
|
|
@@ -150,7 +151,7 @@ export default class Loader extends LitElement {
|
|
|
150
151
|
|
|
151
152
|
/**
|
|
152
153
|
* Event for viewer failing to initially load.
|
|
153
|
-
*
|
|
154
|
+
*
|
|
154
155
|
* To follow more precisely loading failures, you can also watch for sub-components `broken` events.
|
|
155
156
|
* ```js
|
|
156
157
|
* // Watch API breaks
|
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
import "./Map.css";
|
|
2
1
|
import {
|
|
3
2
|
TILES_PICTURES_ZOOM, getThumbGif, isNullCoordinates,
|
|
4
|
-
} from "../../utils/map";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
3
|
+
} from "../../utils/map.js";
|
|
4
|
+
import SemanticsMapProtocol from "../../utils/SemanticsMapProtocol.js";
|
|
5
|
+
import PanoraMapProtocol from "../../utils/PanoraMapProtocol.js";
|
|
6
|
+
import { DISABLED_LEVEL, initIndoorEqualOnMap } from "../../utils/indoor.js";
|
|
7
|
+
import MapStyles from "./Map.css" with { type: "css" };
|
|
8
|
+
document.adoptedStyleSheets.push(MapStyles);
|
|
10
9
|
|
|
11
10
|
// MapLibre imports
|
|
12
|
-
import "maplibre-gl
|
|
13
|
-
|
|
14
|
-
import maplibreglWorker from "maplibre-gl/dist/maplibre-gl-csp-worker";
|
|
11
|
+
import "maplibre-gl";
|
|
12
|
+
//Import maplibreglWorker from "maplibre-gl/dist/maplibre-gl-csp-worker.js";
|
|
15
13
|
import * as pmtiles from "pmtiles";
|
|
16
|
-
|
|
14
|
+
//Maplibregl.workerClass = maplibreglWorker;
|
|
15
|
+
// eslint-disable-next-line no-undef
|
|
17
16
|
maplibregl.addProtocol("pmtiles", new pmtiles.Protocol().tile);
|
|
17
|
+
// eslint-disable-next-line no-undef
|
|
18
18
|
maplibregl.addProtocol("panora", new PanoraMapProtocol().tile());
|
|
19
|
+
// eslint-disable-next-line no-undef
|
|
19
20
|
maplibregl.addProtocol("panoras", new PanoraMapProtocol().tile());
|
|
20
21
|
|
|
22
|
+
const MarkerBaseSVG = new URL("../../img/marker.svg", import.meta.url).href;
|
|
23
|
+
const MarkerSelectedSVG = new URL("../../img/marker_blue.svg", import.meta.url).href;
|
|
24
|
+
|
|
21
25
|
|
|
22
26
|
/**
|
|
23
27
|
* Map is the component showing pictures and sequences geolocation.
|
|
24
|
-
*
|
|
28
|
+
*
|
|
25
29
|
* Note that all functions of [MapLibre GL JS class Map](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/) are also available.
|
|
26
|
-
*
|
|
30
|
+
*
|
|
27
31
|
* A more complete version of Map (with filters & themes) is available through [MapMore class](#Panoramax.components.ui.MapMore)
|
|
28
|
-
*
|
|
32
|
+
*
|
|
29
33
|
* ℹ️ Many style management is done in [MapStyleComposer](#Panoramax.utils.MapStyleComposer), which is available as a property of parent component.
|
|
30
|
-
*
|
|
34
|
+
*
|
|
31
35
|
* ⚠️ This class doesn't inherit from [EventTarget](https://developer.mozilla.org/fr/docs/Web/API/EventTarget), so it doesn't have `addEventListener` and `dispatchEvent` functions.
|
|
32
36
|
* It uses instead [`on`](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/#on) and `fire` functions from MapLibre Map class.
|
|
33
37
|
* `fire` function doesn't take directly [`Event`](https://developer.mozilla.org/fr/docs/Web/API/Event) objects, but a string and object data.
|
|
@@ -52,6 +56,7 @@ maplibregl.addProtocol("panoras", new PanoraMapProtocol().tile());
|
|
|
52
56
|
* @example
|
|
53
57
|
* const map = new Panoramax.components.ui.Map(viewer, mapNode, {center: {lat: 48.7, lng: -1.7}});
|
|
54
58
|
*/
|
|
59
|
+
// eslint-disable-next-line no-undef
|
|
55
60
|
export default class Map extends maplibregl.Map {
|
|
56
61
|
constructor(parent, container, options = {}) {
|
|
57
62
|
super({
|
|
@@ -76,6 +81,7 @@ export default class Map extends maplibregl.Map {
|
|
|
76
81
|
});
|
|
77
82
|
|
|
78
83
|
this._semMapProtocol = new SemanticsMapProtocol(parent);
|
|
84
|
+
// eslint-disable-next-line no-undef
|
|
79
85
|
maplibregl.addProtocol("sem", this._semMapProtocol.tile());
|
|
80
86
|
this._loadMarkerImages();
|
|
81
87
|
|
|
@@ -101,6 +107,7 @@ export default class Map extends maplibregl.Map {
|
|
|
101
107
|
|
|
102
108
|
initIndoorEqualOnMap(this, ![undefined, DISABLED_LEVEL].includes(this._options.level));
|
|
103
109
|
|
|
110
|
+
// eslint-disable-next-line no-undef
|
|
104
111
|
this._attribution = new maplibregl.AttributionControl({ compact: false, ...options.attributionControl });
|
|
105
112
|
this.addControl(this._attribution);
|
|
106
113
|
|
|
@@ -112,6 +119,7 @@ export default class Map extends maplibregl.Map {
|
|
|
112
119
|
|
|
113
120
|
// Popup
|
|
114
121
|
this._picPreviewTimer = null;
|
|
122
|
+
// eslint-disable-next-line no-undef
|
|
115
123
|
this._picPopup = new maplibregl.Popup({
|
|
116
124
|
closeButton: false,
|
|
117
125
|
closeOnClick: !this._parent.isWidthSmall(),
|
|
@@ -144,7 +152,7 @@ export default class Map extends maplibregl.Map {
|
|
|
144
152
|
/**
|
|
145
153
|
* @private
|
|
146
154
|
*/
|
|
147
|
-
|
|
155
|
+
_postLoad() {
|
|
148
156
|
this.resize();
|
|
149
157
|
|
|
150
158
|
// Map background click
|
|
@@ -276,6 +284,7 @@ export default class Map extends maplibregl.Map {
|
|
|
276
284
|
let bbox = this._parent?.api?.getDataBbox();
|
|
277
285
|
if(bbox) {
|
|
278
286
|
try {
|
|
287
|
+
// eslint-disable-next-line no-undef
|
|
279
288
|
bbox = new maplibregl.LngLatBounds(bbox);
|
|
280
289
|
if(this.loaded()) { this.fitBounds(bbox, { "animate": false }); }
|
|
281
290
|
else { this.waitForEnoughMapLoaded().then(() => this.fitBounds(bbox, { "animate": false })); }
|
|
@@ -373,7 +382,7 @@ export default class Map extends maplibregl.Map {
|
|
|
373
382
|
|
|
374
383
|
/**
|
|
375
384
|
* Shows on map a picture position and heading.
|
|
376
|
-
*
|
|
385
|
+
*
|
|
377
386
|
* If no longitude & latitude are set, marker is removed from map.
|
|
378
387
|
* @memberof Panoramax.components.ui.Map#
|
|
379
388
|
* @param {number} lon The longitude
|
|
@@ -396,7 +405,7 @@ export default class Map extends maplibregl.Map {
|
|
|
396
405
|
else {
|
|
397
406
|
this._picMarker.remove();
|
|
398
407
|
}
|
|
399
|
-
|
|
408
|
+
|
|
400
409
|
// Update map style to see selected sequence
|
|
401
410
|
this._parent.mapStyleComposer.updateMapStyle();
|
|
402
411
|
|
|
@@ -460,12 +469,12 @@ export default class Map extends maplibregl.Map {
|
|
|
460
469
|
this._attachPreviewToPictures(eCopy, gridLayerId);
|
|
461
470
|
}
|
|
462
471
|
});
|
|
463
|
-
|
|
472
|
+
|
|
464
473
|
this.on("mouseleave", gridLayerId, () => {
|
|
465
474
|
this._dropPreview();
|
|
466
475
|
this.getCanvas().style.cursor = "";
|
|
467
476
|
});
|
|
468
|
-
|
|
477
|
+
|
|
469
478
|
this.on("click", gridLayerId, e => {
|
|
470
479
|
e.preventDefault();
|
|
471
480
|
this.flyTo({ center: e.lngLat, zoom: TILES_PICTURES_ZOOM-6 });
|
|
@@ -482,6 +491,7 @@ export default class Map extends maplibregl.Map {
|
|
|
482
491
|
*/
|
|
483
492
|
_attachPreviewToPictures(e, from) {
|
|
484
493
|
let f = e.features.pop();
|
|
494
|
+
// eslint-disable-next-line eqeqeq
|
|
485
495
|
if(!f || f.properties.id == this._picPopup._picId) { return; }
|
|
486
496
|
|
|
487
497
|
clearTimeout(this._picPreviewTimer);
|
|
@@ -491,7 +501,7 @@ export default class Map extends maplibregl.Map {
|
|
|
491
501
|
delete this._picPopup._seqId;
|
|
492
502
|
|
|
493
503
|
if(!e.lngLat) { e.lngLat = this.getCenter(); }
|
|
494
|
-
|
|
504
|
+
|
|
495
505
|
|
|
496
506
|
/*
|
|
497
507
|
* Display picture preview marker
|
|
@@ -505,6 +515,7 @@ export default class Map extends maplibregl.Map {
|
|
|
505
515
|
// Look for nearest sequence point
|
|
506
516
|
let prevDist = null;
|
|
507
517
|
for(let i=0; i < f.geometry.coordinates.length; i++) {
|
|
518
|
+
// eslint-disable-next-line no-undef
|
|
508
519
|
let dist = e.lngLat.distanceTo(new maplibregl.LngLat(...f.geometry.coordinates[i]));
|
|
509
520
|
if(!prevDist || dist < prevDist) {
|
|
510
521
|
picPreview = {
|
|
@@ -538,7 +549,7 @@ export default class Map extends maplibregl.Map {
|
|
|
538
549
|
this._picPopup
|
|
539
550
|
.setLngLat(thumbCoords)
|
|
540
551
|
.addTo(this);
|
|
541
|
-
|
|
552
|
+
|
|
542
553
|
// Only show GIF loader if thumbnail is not in browser cache
|
|
543
554
|
if(!picPreview && !this._picThumbUrl[f.properties.id]) {
|
|
544
555
|
this._picPopup.setDOMContent(getThumbGif(this._parent._t));
|
|
@@ -629,7 +640,7 @@ export default class Map extends maplibregl.Map {
|
|
|
629
640
|
return p ? this._parent.getAPI().findThumbnailInPictureFeature(p) : null;
|
|
630
641
|
});
|
|
631
642
|
}
|
|
632
|
-
|
|
643
|
+
|
|
633
644
|
|
|
634
645
|
/**
|
|
635
646
|
* Get picture thumbnail URL for a given sequence ID
|
|
@@ -706,11 +717,12 @@ export default class Map extends maplibregl.Map {
|
|
|
706
717
|
const img = document.createElement("img");
|
|
707
718
|
img.src = selected ? MarkerSelectedSVG : MarkerBaseSVG;
|
|
708
719
|
img.alt = "";
|
|
720
|
+
// eslint-disable-next-line no-undef
|
|
709
721
|
return new maplibregl.Marker({
|
|
710
722
|
element: img,
|
|
711
723
|
picId: null
|
|
712
724
|
})
|
|
713
|
-
//
|
|
725
|
+
// Only picMarker could be draggable, don't for picMarkerPreview.
|
|
714
726
|
.setDraggable(selected && this._options.picMarkerDraggable)
|
|
715
727
|
;
|
|
716
728
|
}
|
|
@@ -749,10 +761,10 @@ export default class Map extends maplibregl.Map {
|
|
|
749
761
|
if(this._parent.psv?.getPicturesNavigation() === "pic") {
|
|
750
762
|
return;
|
|
751
763
|
}
|
|
752
|
-
|
|
764
|
+
|
|
753
765
|
if(e.features.length > 0) {
|
|
754
766
|
let seq = e.features[0];
|
|
755
|
-
|
|
767
|
+
|
|
756
768
|
// If clicks on many sequences, prefer the one corresponding to picture thumbnail preview
|
|
757
769
|
if(e.features.length > 1 && this._picPopup._seqId) {
|
|
758
770
|
seq = e.features.find(s => s.properties.id === this._picPopup._seqId) || seq;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import Map from "./Map";
|
|
2
|
-
import { SEMANTICS_OVERLAYS } from "../../utils/semantics";
|
|
3
|
-
import {
|
|
1
|
+
import Map from "./Map.js";
|
|
2
|
+
import { SEMANTICS_OVERLAYS } from "../../utils/semantics.js";
|
|
3
|
+
import { SEMANTICS_OVERLAY_MAXZOOM, SEMANTICS_OVERLAY_MINZOOM } from "../../utils/SemanticsMapProtocol.js";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* MapMore is a more complete version of [Map UI component](#Panoramax.components.ui.Map).
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* It offers advanced features filters and semantic overlays.
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* Note that all functions of [MapLibre GL JS class Map](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/) are also available.
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
13
|
* ℹ️ Many style management is done in [MapStyleComposer](#Panoramax.utils.MapStyleComposer), which is available as a property of parent component.
|
|
14
|
-
*
|
|
14
|
+
*
|
|
15
15
|
* ⚠️ This class doesn't inherit from [EventTarget](https://developer.mozilla.org/fr/docs/Web/API/EventTarget), so it doesn't have `addEventListener` and `dispatchEvent` functions.
|
|
16
16
|
* It uses instead [`on`](https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/#on) and `fire` functions from MapLibre Map class.
|
|
17
17
|
* `fire` function doesn't take directly [`Event`](https://developer.mozilla.org/fr/docs/Web/API/Event) objects, but a string and object data.
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import "./Photo.css";
|
|
2
|
-
import LoaderImgBase from "../../img/loader_base.jpg";
|
|
3
|
-
import LogoDead from "../../img/logo_dead.svg";
|
|
4
1
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "../../utils/utils";
|
|
9
|
-
import { apiFeatureToPSVNode } from "../../utils/picture";
|
|
2
|
+
BASE_PANORAMA_ID, getDistance, getRelativeHeading,
|
|
3
|
+
getRoadAbsoluteHeading, isNullId, positionToXYZ,
|
|
4
|
+
xyzToPosition,
|
|
5
|
+
} from "../../utils/utils.js";
|
|
6
|
+
import { apiFeatureToPSVNode } from "../../utils/picture.js";
|
|
10
7
|
|
|
11
8
|
// Photo Sphere Viewer imports
|
|
12
|
-
import "@photo-sphere-viewer/core
|
|
13
|
-
import "@photo-sphere-viewer/virtual-tour-plugin/index.css";
|
|
14
|
-
import "@photo-sphere-viewer/gallery-plugin/index.css";
|
|
15
|
-
import "@photo-sphere-viewer/markers-plugin/index.css";
|
|
16
|
-
import { Viewer as PSViewer, CONSTANTS } from "@photo-sphere-viewer/core";
|
|
9
|
+
import { CONSTANTS, Viewer as PSViewer } from "@photo-sphere-viewer/core";
|
|
17
10
|
import { VirtualTourPlugin } from "@photo-sphere-viewer/virtual-tour-plugin";
|
|
18
11
|
import { MarkersPlugin } from "@photo-sphere-viewer/markers-plugin";
|
|
19
|
-
import PhotoAdapter from "../../utils/PhotoAdapter";
|
|
12
|
+
import PhotoAdapter from "../../utils/PhotoAdapter.js";
|
|
13
|
+
import PhotoStyles from "./Photo.css" with { type: "css" };
|
|
14
|
+
document.adoptedStyleSheets.push(PhotoStyles);
|
|
15
|
+
|
|
16
|
+
const LogoDead = new URL("../../img/logo_dead.svg", import.meta.url).href;
|
|
17
|
+
const LoaderImgBase = new URL("../../img/loader_base.jpg", import.meta.url).href;
|
|
20
18
|
|
|
21
19
|
|
|
22
20
|
// Default panorama (logo)
|
|
@@ -39,7 +37,7 @@ const BASE_PANORAMA_NODE = {
|
|
|
39
37
|
properties: {},
|
|
40
38
|
};
|
|
41
39
|
|
|
42
|
-
export const PSV_DEFAULT_ZOOM = 30;
|
|
40
|
+
export const PSV_DEFAULT_ZOOM = 30;
|
|
43
41
|
export const PSV_ANIM_DURATION = 250;
|
|
44
42
|
export const PIC_MAX_STAY_DURATION = 3000;
|
|
45
43
|
|
|
@@ -239,6 +237,7 @@ export default class Photo extends PSViewer {
|
|
|
239
237
|
|
|
240
238
|
const animationDuration = this._shouldGoFast() ? 0 : Math.min(PSV_ANIM_DURATION, this._transitionDuration);
|
|
241
239
|
const animated = animationDuration > 100;
|
|
240
|
+
// eslint-disable-next-line eqeqeq
|
|
242
241
|
const following = (fromLink || fromNode?.links.find(a => a.nodeId == toNode.id)) != null;
|
|
243
242
|
const sameSequence = fromNode && toNode.sequence.id === fromNode.sequence.id;
|
|
244
243
|
const fromNodeHeading = (fromNode?.properties?.["view:azimuth"] || 0) * (Math.PI / 180);
|
|
@@ -257,6 +256,7 @@ export default class Photo extends PSViewer {
|
|
|
257
256
|
};
|
|
258
257
|
|
|
259
258
|
// Going to 360
|
|
259
|
+
// eslint-disable-next-line eqeqeq
|
|
260
260
|
if(toNode.horizontalFov == 360) {
|
|
261
261
|
// No previous sequence -> Point to center + no animation
|
|
262
262
|
if(!fromNode) {
|
|
@@ -277,7 +277,7 @@ export default class Photo extends PSViewer {
|
|
|
277
277
|
rotateTo: this.getPosition()
|
|
278
278
|
};
|
|
279
279
|
// Constant direction related to North
|
|
280
|
-
//
|
|
280
|
+
// NodeTransition.rotateTo.yaw += fromNodeHeading - toNodeHeading;
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
}
|
|
@@ -336,6 +336,7 @@ export default class Photo extends PSViewer {
|
|
|
336
336
|
picId: toNode.id,
|
|
337
337
|
lon: toNode.gps[0],
|
|
338
338
|
lat: toNode.gps[1],
|
|
339
|
+
// eslint-disable-next-line eqeqeq
|
|
339
340
|
first: this._parent._initParams?.getParentPostInit().picture == toNode.id,
|
|
340
341
|
}
|
|
341
342
|
});
|
|
@@ -464,6 +465,7 @@ export default class Photo extends PSViewer {
|
|
|
464
465
|
}
|
|
465
466
|
|
|
466
467
|
if(e.node.id) {
|
|
468
|
+
// eslint-disable-next-line eqeqeq
|
|
467
469
|
const isFirst = this._parent._initParams?.getParentPostInit().picture == e.node.id;
|
|
468
470
|
this._parent.select(e.node?.sequence?.id, e.node.id);
|
|
469
471
|
const picMeta = this.getPictureMetadata();
|
|
@@ -628,7 +630,7 @@ export default class Photo extends PSViewer {
|
|
|
628
630
|
throw new Error("No picture currently selected");
|
|
629
631
|
}
|
|
630
632
|
|
|
631
|
-
if(this._picturesNavigation
|
|
633
|
+
if(this._picturesNavigation === "pic") {
|
|
632
634
|
throw new Error("Pictures navigation is locked to current picture");
|
|
633
635
|
}
|
|
634
636
|
|
|
@@ -651,7 +653,7 @@ export default class Photo extends PSViewer {
|
|
|
651
653
|
throw new Error("No picture currently selected");
|
|
652
654
|
}
|
|
653
655
|
|
|
654
|
-
if(this._picturesNavigation
|
|
656
|
+
if(this._picturesNavigation === "pic") {
|
|
655
657
|
throw new Error("Pictures navigation is locked to current picture");
|
|
656
658
|
}
|
|
657
659
|
|
|
@@ -674,11 +676,11 @@ export default class Photo extends PSViewer {
|
|
|
674
676
|
* @reject {Error} If no picture found
|
|
675
677
|
*/
|
|
676
678
|
async goToPosition(lat, lon) {
|
|
677
|
-
if(this._picturesNavigation
|
|
679
|
+
if(this._picturesNavigation === "pic") {
|
|
678
680
|
throw new Error("Pictures navigation is locked to current picture");
|
|
679
681
|
}
|
|
680
682
|
|
|
681
|
-
return this._parent.getAPI().getPicturesAroundCoordinates(lat, lon)
|
|
683
|
+
return await this._parent.getAPI().getPicturesAroundCoordinates(lat, lon)
|
|
682
684
|
.then(res => {
|
|
683
685
|
if(res.features.length > 0) {
|
|
684
686
|
const f = res.features.pop();
|
|
@@ -974,7 +976,7 @@ export default class Photo extends PSViewer {
|
|
|
974
976
|
// Immediate switch of navigation arrows
|
|
975
977
|
const arrows = this.container.querySelector(".psv-virtual-tour-arrows");
|
|
976
978
|
if(arrows) {
|
|
977
|
-
arrows.style.display = pn
|
|
979
|
+
arrows.style.display = pn === "pic" ? "none" : null;
|
|
978
980
|
}
|
|
979
981
|
|
|
980
982
|
/**
|
|
@@ -1033,7 +1035,7 @@ export default class Photo extends PSViewer {
|
|
|
1033
1035
|
*/
|
|
1034
1036
|
toggleAllAnnotations(visible) {
|
|
1035
1037
|
const meta = this.getPictureMetadata();
|
|
1036
|
-
const skipEvent = this._annotationsVisible
|
|
1038
|
+
const skipEvent = this._annotationsVisible === visible;
|
|
1037
1039
|
if(!meta) {
|
|
1038
1040
|
this._myMarkers.clearMarkers();
|
|
1039
1041
|
throw new Error("No picture currently selected");
|
|
@@ -1246,7 +1248,7 @@ export default class Photo extends PSViewer {
|
|
|
1246
1248
|
style: { cursor: "grab" },
|
|
1247
1249
|
});
|
|
1248
1250
|
|
|
1249
|
-
if(this._drawingAnnotation.length
|
|
1251
|
+
if(this._drawingAnnotation.length === 2 && this._myMarkers.markers[DRAW_ANNOT_RECT]) {
|
|
1250
1252
|
this._myMarkers.updateMarker({
|
|
1251
1253
|
id: DRAW_ANNOT_RECT,
|
|
1252
1254
|
polygon: [
|
|
@@ -1295,7 +1297,7 @@ export default class Photo extends PSViewer {
|
|
|
1295
1297
|
// Click on first vertex
|
|
1296
1298
|
if(this._drawingMoves !== 2 && e.marker.id === DRAW_ANNOT_1ST) {
|
|
1297
1299
|
// First time ? Start moving second vertex
|
|
1298
|
-
if(this._drawingAnnotation.length
|
|
1300
|
+
if(this._drawingAnnotation.length === 0) {
|
|
1299
1301
|
this._drawingAnnotation.push({ yaw: e.marker.config.position.yaw, pitch: e.marker.config.position.pitch });
|
|
1300
1302
|
this.parent.removeEventListener("mousemove", firstMove);
|
|
1301
1303
|
this._myMarkers.updateMarker({
|
|
@@ -1331,7 +1333,7 @@ export default class Photo extends PSViewer {
|
|
|
1331
1333
|
// Click on second vertex
|
|
1332
1334
|
else if(this._drawingMoves !== 1 && e.marker.id === DRAW_ANNOT_2ND) {
|
|
1333
1335
|
// First time ? Fix rectangle
|
|
1334
|
-
if(this._drawingAnnotation.length
|
|
1336
|
+
if(this._drawingAnnotation.length === 1) {
|
|
1335
1337
|
this._drawingAnnotation.push({ yaw: e.marker.config.position.yaw, pitch: e.marker.config.position.pitch });
|
|
1336
1338
|
this.parent.removeEventListener("mousemove", secMove);
|
|
1337
1339
|
this._myMarkers.updateMarker({
|
|
@@ -1418,7 +1420,7 @@ export default class Photo extends PSViewer {
|
|
|
1418
1420
|
fixDrawAnnotation() {
|
|
1419
1421
|
[DRAW_ANNOT_1ST, DRAW_ANNOT_2ND].forEach(mid => {
|
|
1420
1422
|
try { this._myMarkers.removeMarker(mid); }
|
|
1421
|
-
catch(e) {}
|
|
1423
|
+
catch(e) {}
|
|
1422
1424
|
});
|
|
1423
1425
|
(this._drawListeners || []).forEach(l => this.parent.removeEventListener("mousemove", l));
|
|
1424
1426
|
this._myMarkers.removeEventListener("select-marker", this._drawListenerClick);
|
|
@@ -1441,7 +1443,7 @@ export default class Photo extends PSViewer {
|
|
|
1441
1443
|
stopDrawAnnotation() {
|
|
1442
1444
|
[DRAW_ANNOT_1ST, DRAW_ANNOT_2ND, DRAW_ANNOT_RECT].forEach(mid => {
|
|
1443
1445
|
try { this._myMarkers.removeMarker(mid); }
|
|
1444
|
-
catch(e) {}
|
|
1446
|
+
catch(e) {}
|
|
1445
1447
|
});
|
|
1446
1448
|
(this._drawListeners || []).forEach(l => this.parent.removeEventListener("mousemove", l));
|
|
1447
1449
|
this._myMarkers.removeEventListener("select-marker", this._drawListenerClick);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { LitElement,
|
|
2
|
-
import { fa } from "../../utils/widgets";
|
|
3
|
-
import {
|
|
4
|
-
import { faXmark } from "@fortawesome/free-solid-svg-icons
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
|
+
import { fa } from "../../utils/widgets.js";
|
|
3
|
+
import { faSvg, panel } from "../styles.js";
|
|
4
|
+
import { faXmark } from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Popup Element displays a full overlay container.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LitElement,
|
|
2
|
-
import { QUALITYSCORE_VALUES } from "../../utils/utils";
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
|
+
import { QUALITYSCORE_VALUES } from "../../utils/utils.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Quality Score element displays the picture quality grade.
|
|
@@ -11,7 +11,7 @@ import { QUALITYSCORE_VALUES } from "../../utils/utils";
|
|
|
11
11
|
* ```html
|
|
12
12
|
* <!-- Read-only -->
|
|
13
13
|
* <pnx-quality-score grade="5" ._t=${viewer._t} />
|
|
14
|
-
*
|
|
14
|
+
*
|
|
15
15
|
* <!-- Input -->
|
|
16
16
|
* <pnx-quality-score grade="5" input="pnx-qs-input" @change=${() => alert('changed')} ._t=${viewer._t} />
|
|
17
17
|
* ```
|
|
@@ -28,7 +28,7 @@ export default class QualityScore extends LitElement {
|
|
|
28
28
|
align-items: center;
|
|
29
29
|
color: white;
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
/* Single letter */
|
|
33
33
|
span, label {
|
|
34
34
|
width: 1.2em;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { LitElement,
|
|
1
|
+
import { LitElement, css, html, nothing } from "lit";
|
|
2
2
|
import { classMap } from "lit/directives/class-map.js";
|
|
3
3
|
import { map } from "lit/directives/map.js";
|
|
4
|
-
import { fa, listenForMenuClosure } from "../../utils/widgets";
|
|
5
|
-
import { faSvg } from "../styles";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { faXmark } from "@fortawesome/free-solid-svg-icons/faXmark";
|
|
4
|
+
import { fa, listenForMenuClosure } from "../../utils/widgets.js";
|
|
5
|
+
import { faSvg } from "../styles.js";
|
|
6
|
+
import {
|
|
7
|
+
faCircleExclamation, faCircleNotch, faMagnifyingGlass, faXmark
|
|
8
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
/**
|