@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.
Files changed (341) hide show
  1. package/{src → build}/components/core/Basic.js +22 -16
  2. package/{src → build}/components/core/CoverageMap.js +19 -14
  3. package/{src → build}/components/core/Editor.js +16 -16
  4. package/{src → build}/components/core/PhotoViewer.js +30 -29
  5. package/{src → build}/components/core/Viewer.js +21 -20
  6. package/build/components/core/index.js +10 -0
  7. package/build/components/index.js +11 -0
  8. package/build/components/index_photoviewer.js +6 -0
  9. package/{src → build}/components/layout/BottomDrawer.js +4 -4
  10. package/{src → build}/components/layout/CorneredGrid.js +1 -1
  11. package/{src → build}/components/layout/Mini.js +5 -4
  12. package/{src → build}/components/layout/Tabs.js +1 -1
  13. package/build/components/layout/index.js +9 -0
  14. package/{src → build}/components/menus/LocationPrecisionDoc.js +4 -6
  15. package/{src → build}/components/menus/MapBackground.js +4 -6
  16. package/{src → build}/components/menus/MapFilters.js +16 -21
  17. package/{src → build}/components/menus/MapLayers.js +20 -24
  18. package/{src → build}/components/menus/MapLegend.js +3 -4
  19. package/{src → build}/components/menus/MiniPictureLegend.js +3 -4
  20. package/{src → build}/components/menus/PictureLegend.js +10 -15
  21. package/{src → build}/components/menus/PictureMetadata.js +12 -19
  22. package/{src → build}/components/menus/PlayerOptions.js +5 -7
  23. package/{src → build}/components/menus/QualityScoreDoc.js +3 -4
  24. package/{src → build}/components/menus/ReportForm.js +8 -9
  25. package/{src → build}/components/menus/SemanticsDoc.js +3 -4
  26. package/{src → build}/components/menus/SemanticsDownload.js +3 -3
  27. package/{src → build}/components/menus/SemanticsFilters.js +7 -8
  28. package/{src → build}/components/menus/SemanticsList.js +11 -18
  29. package/{src → build}/components/menus/SemanticsMetadata.js +8 -11
  30. package/{src → build}/components/menus/Share.js +6 -7
  31. package/build/components/menus/index.js +22 -0
  32. package/build/components/menus/index_photoviewer.js +11 -0
  33. package/{src → build}/components/styles.js +0 -2
  34. package/{src → build}/components/ui/AnnotationsSwitch.js +6 -8
  35. package/{src → build}/components/ui/Button.js +1 -1
  36. package/{src → build}/components/ui/ButtonGroup.js +2 -1
  37. package/{src → build}/components/ui/CopyButton.js +4 -6
  38. package/{src → build}/components/ui/Grade.js +5 -5
  39. package/{src → build}/components/ui/GradeFilter.js +3 -3
  40. package/{src → build}/components/ui/IconSwitch.js +1 -1
  41. package/{src → build}/components/ui/LinkButton.js +1 -1
  42. package/{src → build}/components/ui/ListGroup.js +3 -3
  43. package/{src → build}/components/ui/ListItem.js +1 -1
  44. package/{src → build}/components/ui/Loader.js +8 -7
  45. package/{src → build}/components/ui/Map.js +38 -26
  46. package/{src → build}/components/ui/MapMore.js +7 -7
  47. package/{src → build}/components/ui/Photo.js +29 -27
  48. package/{src → build}/components/ui/Popup.js +4 -4
  49. package/{src → build}/components/ui/QualityScore.js +4 -4
  50. package/{src → build}/components/ui/SearchBar.js +6 -7
  51. package/{src → build}/components/ui/SemanticsEditor.js +14 -15
  52. package/{src → build}/components/ui/SemanticsTable.js +4 -5
  53. package/{src → build}/components/ui/Switch.js +1 -1
  54. package/{src → build}/components/ui/TogglableGroup.js +4 -4
  55. package/build/components/ui/index.js +29 -0
  56. package/build/components/ui/index_photoviewer.js +21 -0
  57. package/{src → build}/components/ui/widgets/CopyCoordinates.js +5 -5
  58. package/{src → build}/components/ui/widgets/GeoSearch.js +10 -10
  59. package/{src → build}/components/ui/widgets/Legend.js +9 -8
  60. package/{src → build}/components/ui/widgets/LevelSelect.js +9 -7
  61. package/{src → build}/components/ui/widgets/MapFiltersButton.js +5 -5
  62. package/{src → build}/components/ui/widgets/MapLayersButton.js +5 -5
  63. package/{src → build}/components/ui/widgets/OSMEditors.js +8 -8
  64. package/{src → build}/components/ui/widgets/PictureLegendActions.js +4 -4
  65. package/{src → build}/components/ui/widgets/Player.js +6 -7
  66. package/{src → build}/components/ui/widgets/SemanticsFiltersButton.js +6 -7
  67. package/{src → build}/components/ui/widgets/Zoom.js +6 -6
  68. package/build/components/ui/widgets/index.js +16 -0
  69. package/build/components/ui/widgets/index_photoviewer.js +7 -0
  70. package/build/editor.html +94 -10
  71. package/{src → build}/img/arrow_triangle.svg +0 -1
  72. package/{src → build}/img/arrow_turn.svg +0 -1
  73. package/build/index.html +111 -1
  74. package/build/index.js +6 -95
  75. package/build/index_photoviewer.js +4 -0
  76. package/build/map.html +97 -1
  77. package/build/package.json +141 -0
  78. package/build/photo.html +85 -1
  79. package/build/servers.js +3 -4
  80. package/{src → build}/utils/API.js +33 -33
  81. package/{src → build}/utils/InitParameters.js +11 -9
  82. package/{src → build}/utils/MapStyleComposer.js +39 -37
  83. package/{src → build}/utils/PhotoAdapter.js +1 -0
  84. package/{src → build}/utils/PresetsManager.js +4 -4
  85. package/{src → build}/utils/SemanticsMapProtocol.js +3 -4
  86. package/{src → build}/utils/URLHandler.js +16 -14
  87. package/{src → build}/utils/geocoder.js +5 -5
  88. package/{src → build}/utils/i18n.js +21 -20
  89. package/build/utils/index.js +17 -0
  90. package/build/utils/index_photoviewer.js +14 -0
  91. package/{src → build}/utils/indoor.js +9 -5
  92. package/{src → build}/utils/map.js +15 -11
  93. package/{src → build}/utils/picture.js +22 -17
  94. package/{src → build}/utils/semantics.js +9 -5
  95. package/{src → build}/utils/utils.js +8 -4
  96. package/{src → build}/utils/widgets.js +2 -2
  97. package/build/viewer.html +120 -35
  98. package/build/viewer_indoor.html +90 -8
  99. package/build/widgets.html +410 -1
  100. package/package.json +81 -204
  101. package/.dockerignore +0 -7
  102. package/.gitlab-ci.yml +0 -78
  103. package/CHANGELOG.md +0 -853
  104. package/CODE_OF_CONDUCT.md +0 -134
  105. package/Dockerfile +0 -14
  106. package/build/index.css +0 -36
  107. package/build/index.css.map +0 -1
  108. package/build/index.js.map +0 -1
  109. package/build/photoviewer.css +0 -36
  110. package/build/photoviewer.css.map +0 -1
  111. package/build/photoviewer.js +0 -86
  112. package/build/photoviewer.js.map +0 -1
  113. package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff +0 -0
  114. package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff2 +0 -0
  115. package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff +0 -0
  116. package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff2 +0 -0
  117. package/config/env.js +0 -104
  118. package/config/getHttpsConfig.js +0 -69
  119. package/config/getPackageJson.js +0 -25
  120. package/config/jest/babelTransform.js +0 -29
  121. package/config/jest/cssTransform.js +0 -14
  122. package/config/jest/fileTransform.js +0 -40
  123. package/config/jest/mocks.js +0 -230
  124. package/config/modules.js +0 -134
  125. package/config/paths.js +0 -76
  126. package/config/pnpTs.js +0 -35
  127. package/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
  128. package/config/webpack.config.js +0 -825
  129. package/config/webpackDevServer.config.js +0 -131
  130. package/docs/03_URL_settings.md +0 -218
  131. package/docs/05_Compatibility.md +0 -83
  132. package/docs/09_Develop.md +0 -141
  133. package/docs/90_Releases.md +0 -27
  134. package/docs/images/class_diagram.drawio +0 -144
  135. package/docs/images/class_diagram.jpg +0 -0
  136. package/docs/images/comparative_3drender.jpg +0 -0
  137. package/docs/images/indoor_level.png +0 -0
  138. package/docs/images/screenshot.jpg +0 -0
  139. package/docs/index.md +0 -159
  140. package/docs/reference/components/core/Basic.md +0 -211
  141. package/docs/reference/components/core/CoverageMap.md +0 -220
  142. package/docs/reference/components/core/Editor.md +0 -252
  143. package/docs/reference/components/core/PhotoViewer.md +0 -320
  144. package/docs/reference/components/core/Viewer.md +0 -398
  145. package/docs/reference/components/layout/BottomDrawer.md +0 -35
  146. package/docs/reference/components/layout/CorneredGrid.md +0 -29
  147. package/docs/reference/components/layout/Mini.md +0 -45
  148. package/docs/reference/components/layout/Tabs.md +0 -46
  149. package/docs/reference/components/menus/LocationPrecisionDoc.md +0 -15
  150. package/docs/reference/components/menus/MapBackground.md +0 -32
  151. package/docs/reference/components/menus/MapFilters.md +0 -37
  152. package/docs/reference/components/menus/MapLayers.md +0 -15
  153. package/docs/reference/components/menus/MapLegend.md +0 -32
  154. package/docs/reference/components/menus/MiniPictureLegend.md +0 -15
  155. package/docs/reference/components/menus/PictureLegend.md +0 -45
  156. package/docs/reference/components/menus/PictureMetadata.md +0 -32
  157. package/docs/reference/components/menus/PlayerOptions.md +0 -15
  158. package/docs/reference/components/menus/QualityScoreDoc.md +0 -15
  159. package/docs/reference/components/menus/ReportForm.md +0 -15
  160. package/docs/reference/components/menus/SemanticsDoc.md +0 -15
  161. package/docs/reference/components/menus/SemanticsDownload.md +0 -15
  162. package/docs/reference/components/menus/SemanticsFilters.md +0 -33
  163. package/docs/reference/components/menus/SemanticsList.md +0 -97
  164. package/docs/reference/components/menus/SemanticsMetadata.md +0 -15
  165. package/docs/reference/components/menus/ShareMenu.md +0 -32
  166. package/docs/reference/components/ui/AnnotationsSwitch.md +0 -32
  167. package/docs/reference/components/ui/Button.md +0 -40
  168. package/docs/reference/components/ui/ButtonGroup.md +0 -36
  169. package/docs/reference/components/ui/CopyButton.md +0 -41
  170. package/docs/reference/components/ui/Grade.md +0 -32
  171. package/docs/reference/components/ui/GradeFilter.md +0 -42
  172. package/docs/reference/components/ui/IconSwitch.md +0 -53
  173. package/docs/reference/components/ui/LinkButton.md +0 -45
  174. package/docs/reference/components/ui/ListGroup.md +0 -22
  175. package/docs/reference/components/ui/ListItem.md +0 -39
  176. package/docs/reference/components/ui/Loader.md +0 -56
  177. package/docs/reference/components/ui/Map.md +0 -150
  178. package/docs/reference/components/ui/MapMore.md +0 -150
  179. package/docs/reference/components/ui/Photo.md +0 -495
  180. package/docs/reference/components/ui/Popup.md +0 -56
  181. package/docs/reference/components/ui/ProgressBar.md +0 -32
  182. package/docs/reference/components/ui/QualityScore.md +0 -45
  183. package/docs/reference/components/ui/SearchBar.md +0 -63
  184. package/docs/reference/components/ui/SemanticsEditor.md +0 -113
  185. package/docs/reference/components/ui/SemanticsTable.md +0 -32
  186. package/docs/reference/components/ui/Switch.md +0 -49
  187. package/docs/reference/components/ui/TogglableGroup.md +0 -39
  188. package/docs/reference/components/ui/widgets/CopyCoordinates.md +0 -32
  189. package/docs/reference/components/ui/widgets/GeoSearch.md +0 -36
  190. package/docs/reference/components/ui/widgets/Legend.md +0 -58
  191. package/docs/reference/components/ui/widgets/LevelSelect.md +0 -16
  192. package/docs/reference/components/ui/widgets/MapFiltersButton.md +0 -37
  193. package/docs/reference/components/ui/widgets/MapLayersButton.md +0 -15
  194. package/docs/reference/components/ui/widgets/OSMEditors.md +0 -15
  195. package/docs/reference/components/ui/widgets/PictureLegendActions.md +0 -32
  196. package/docs/reference/components/ui/widgets/Player.md +0 -34
  197. package/docs/reference/components/ui/widgets/SemanticsFiltersButton.md +0 -15
  198. package/docs/reference/components/ui/widgets/Zoom.md +0 -15
  199. package/docs/reference/utils/API.md +0 -389
  200. package/docs/reference/utils/InitParameters.md +0 -68
  201. package/docs/reference/utils/MapStyleComposer.md +0 -408
  202. package/docs/reference/utils/PanoraMapProtocol.md +0 -28
  203. package/docs/reference/utils/PresetsManager.md +0 -43
  204. package/docs/reference/utils/SemanticsMapProtocol.md +0 -43
  205. package/docs/reference/utils/URLHandler.md +0 -114
  206. package/docs/reference.md +0 -99
  207. package/docs/shortcuts.md +0 -11
  208. package/docs/tutorials/aerial_imagery.md +0 -21
  209. package/docs/tutorials/authentication.md +0 -10
  210. package/docs/tutorials/custom_widgets.md +0 -59
  211. package/docs/tutorials/indoor_maps.md +0 -50
  212. package/docs/tutorials/map_style.md +0 -83
  213. package/docs/tutorials/migrate_v4.md +0 -153
  214. package/docs/tutorials/migrate_v5.md +0 -103
  215. package/docs/tutorials/semantics_overlays.md +0 -74
  216. package/docs/tutorials/synced_coverage.md +0 -43
  217. package/mkdocs.yml +0 -131
  218. package/public/editor.html +0 -53
  219. package/public/index.html +0 -70
  220. package/public/map.html +0 -55
  221. package/public/photo.html +0 -43
  222. package/public/servers.js +0 -15
  223. package/public/viewer.html +0 -79
  224. package/public/viewer_indoor.html +0 -48
  225. package/public/widgets.html +0 -366
  226. package/scripts/build.js +0 -217
  227. package/scripts/doc.js +0 -79
  228. package/scripts/start.js +0 -172
  229. package/scripts/test.js +0 -52
  230. package/src/components/core/index.js +0 -12
  231. package/src/components/index.js +0 -13
  232. package/src/components/index_photoviewer.js +0 -8
  233. package/src/components/layout/index.js +0 -9
  234. package/src/components/menus/index.js +0 -22
  235. package/src/components/menus/index_photoviewer.js +0 -13
  236. package/src/components/ui/index.js +0 -29
  237. package/src/components/ui/index_photoviewer.js +0 -23
  238. package/src/components/ui/widgets/index.js +0 -16
  239. package/src/components/ui/widgets/index_photoviewer.js +0 -9
  240. package/src/index.js +0 -8
  241. package/src/index_photoviewer.js +0 -6
  242. package/src/utils/index.js +0 -17
  243. package/src/utils/index_photoviewer.js +0 -16
  244. package/tests/components/core/Basic.test.js +0 -168
  245. package/tests/components/core/BasicMock.js +0 -25
  246. package/tests/components/core/CoverageMap.test.js +0 -20
  247. package/tests/components/core/Editor.test.js +0 -20
  248. package/tests/components/core/PhotoViewer.test.js +0 -57
  249. package/tests/components/core/Viewer.test.js +0 -85
  250. package/tests/components/core/__snapshots__/PhotoViewer.test.js.snap +0 -96
  251. package/tests/components/core/__snapshots__/Viewer.test.js.snap +0 -188
  252. package/tests/components/ui/CopyButton.test.js +0 -52
  253. package/tests/components/ui/Loader.test.js +0 -55
  254. package/tests/components/ui/Map.test.js +0 -145
  255. package/tests/components/ui/Photo.test.js +0 -437
  256. package/tests/components/ui/Popup.test.js +0 -26
  257. package/tests/components/ui/QualityScore.test.js +0 -18
  258. package/tests/components/ui/SearchBar.test.js +0 -110
  259. package/tests/components/ui/__snapshots__/CopyButton.test.js.snap +0 -33
  260. package/tests/components/ui/__snapshots__/Loader.test.js.snap +0 -56
  261. package/tests/components/ui/__snapshots__/Map.test.js.snap +0 -16
  262. package/tests/components/ui/__snapshots__/Photo.test.js.snap +0 -263
  263. package/tests/components/ui/__snapshots__/Popup.test.js.snap +0 -29
  264. package/tests/components/ui/__snapshots__/QualityScore.test.js.snap +0 -11
  265. package/tests/components/ui/__snapshots__/SearchBar.test.js.snap +0 -65
  266. package/tests/data/Map_geocoder_ban.json +0 -36
  267. package/tests/data/Map_geocoder_nominatim.json +0 -41
  268. package/tests/data/Viewer_pictures_1.json +0 -148
  269. package/tests/setupTests.js +0 -5
  270. package/tests/utils/API.test.js +0 -752
  271. package/tests/utils/InitParameters.test.js +0 -599
  272. package/tests/utils/MapStyleComposer.test.js +0 -697
  273. package/tests/utils/PresetsManager.test.js +0 -123
  274. package/tests/utils/URLHandler.test.js +0 -587
  275. package/tests/utils/__snapshots__/API.test.js.snap +0 -40
  276. package/tests/utils/__snapshots__/MapStyleComposer.test.js.snap +0 -767
  277. package/tests/utils/__snapshots__/URLHandler.test.js.snap +0 -21
  278. package/tests/utils/__snapshots__/geocoder.test.js.snap +0 -37
  279. package/tests/utils/__snapshots__/map.test.js.snap +0 -1249
  280. package/tests/utils/__snapshots__/picture.test.js.snap +0 -327
  281. package/tests/utils/__snapshots__/widgets.test.js.snap +0 -19
  282. package/tests/utils/geocoder.test.js +0 -37
  283. package/tests/utils/i18n.test.js +0 -111
  284. package/tests/utils/map.test.js +0 -200
  285. package/tests/utils/picture.test.js +0 -745
  286. package/tests/utils/semantics.test.js +0 -174
  287. package/tests/utils/utils.test.js +0 -358
  288. package/tests/utils/widgets.test.js +0 -31
  289. /package/{src → build}/components/core/Basic.css +0 -0
  290. /package/{src → build}/components/core/CoverageMap.css +0 -0
  291. /package/{src → build}/components/core/Editor.css +0 -0
  292. /package/{src → build}/components/core/PhotoViewer.css +0 -0
  293. /package/{src → build}/components/core/Viewer.css +0 -0
  294. /package/{src → build}/components/ui/ButtonGroup.css +0 -0
  295. /package/{src → build}/components/ui/Map.css +0 -0
  296. /package/{src → build}/components/ui/Photo.css +0 -0
  297. /package/{src → build}/components/ui/ProgressBar.js +0 -0
  298. /package/{src → build}/components/ui/widgets/GeoSearch.css +0 -0
  299. /package/{src → build}/components/ui/widgets/LevelSelect.css +0 -0
  300. /package/{src → build}/components/ui/widgets/Player.css +0 -0
  301. /package/{public → build}/favicon.ico +0 -0
  302. /package/{src → build}/img/arrow_360.svg +0 -0
  303. /package/{src → build}/img/arrow_flat.svg +0 -0
  304. /package/{src → build}/img/bg_aerial.jpg +0 -0
  305. /package/{src → build}/img/bg_streets.jpg +0 -0
  306. /package/{src → build}/img/loader_base.jpg +0 -0
  307. /package/{src → build}/img/logo_dead.svg +0 -0
  308. /package/{src → build}/img/marker.svg +0 -0
  309. /package/{src → build}/img/marker_blue.svg +0 -0
  310. /package/{src → build}/img/osm.svg +0 -0
  311. /package/{src → build}/img/panoramax.svg +0 -0
  312. /package/{src → build}/img/switch_big.svg +0 -0
  313. /package/{src → build}/img/switch_mini.svg +0 -0
  314. /package/{src → build}/img/wd.svg +0 -0
  315. /package/{src → build}/translations/ar.json +0 -0
  316. /package/{src → build}/translations/be.json +0 -0
  317. /package/{src → build}/translations/br.json +0 -0
  318. /package/{src → build}/translations/cy.json +0 -0
  319. /package/{src → build}/translations/da.json +0 -0
  320. /package/{src → build}/translations/de.json +0 -0
  321. /package/{src → build}/translations/en.json +0 -0
  322. /package/{src → build}/translations/eo.json +0 -0
  323. /package/{src → build}/translations/es.json +0 -0
  324. /package/{src → build}/translations/fi.json +0 -0
  325. /package/{src → build}/translations/fr.json +0 -0
  326. /package/{src → build}/translations/hu.json +0 -0
  327. /package/{src → build}/translations/it.json +0 -0
  328. /package/{src → build}/translations/ja.json +0 -0
  329. /package/{src → build}/translations/ko.json +0 -0
  330. /package/{src → build}/translations/nl.json +0 -0
  331. /package/{src → build}/translations/nn.json +0 -0
  332. /package/{src → build}/translations/pl.json +0 -0
  333. /package/{src → build}/translations/pt.json +0 -0
  334. /package/{src → build}/translations/pt_BR.json +0 -0
  335. /package/{src → build}/translations/sv.json +0 -0
  336. /package/{src → build}/translations/ti.json +0 -0
  337. /package/{src → build}/translations/tr.json +0 -0
  338. /package/{src → build}/translations/uk.json +0 -0
  339. /package/{src → build}/translations/zh_Hant.json +0 -0
  340. /package/{src → build}/utils/PanoraMapProtocol.js +0 -0
  341. /package/{src → build}/utils/services.js +0 -0
@@ -1,11 +1,10 @@
1
- import { LitElement, html, css, nothing } from "lit";
2
- import { fa, onceParentAvailable } from "../../utils/widgets";
3
- import { faTags } from "@fortawesome/free-solid-svg-icons/faTags";
4
- import { faTriangleExclamation } from "@fortawesome/free-solid-svg-icons/faTriangleExclamation";
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,5 @@
1
1
  import { LitElement } from "lit";
2
- import { btn } from "../styles";
2
+ import { btn } from "../styles.js";
3
3
 
4
4
  /**
5
5
  * Button element displays a direct action button.
@@ -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, html, css } from "lit";
2
- import { fa } from "../../utils/widgets";
3
- import { faCheck } from "@fortawesome/free-solid-svg-icons/faCheck";
4
- import { faCopy } from "@fortawesome/free-solid-svg-icons/faCopy";
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, html, css } from "lit";
2
- import { fa } from "../../utils/widgets";
3
- import { faStar } from "@fortawesome/free-solid-svg-icons/faStar";
4
- import { faStar as farStar } from "@fortawesome/free-regular-svg-icons/faStar";
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, html, css } from "lit";
2
- import { fa } from "../../utils/widgets";
3
- import { faStar } from "@fortawesome/free-solid-svg-icons/faStar";
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,4 +1,4 @@
1
- import { LitElement, html, css } from "lit";
1
+ import { LitElement, css, html } from "lit";
2
2
 
3
3
  /**
4
4
  * Icon Switch button, based on a native checkbox.
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from "lit";
2
- import { btn } from "../styles";
2
+ import { btn } from "../styles.js";
3
3
 
4
4
  /**
5
5
  * Link Button element displays a HTML `<a>` anchor with a button style.
@@ -1,9 +1,9 @@
1
- import { LitElement, html, css } from "lit";
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,4 +1,4 @@
1
- import { LitElement, html, css } from "lit";
1
+ import { LitElement, css, html } from "lit";
2
2
 
3
3
  /**
4
4
  * ListItem is a list entry, in a Material Design fashion.
@@ -1,7 +1,8 @@
1
- import { LitElement, html, css, unsafeCSS, nothing } from "lit";
2
- import LogoDead from "../../img/logo_dead.svg";
3
- import LoaderBg from "../../img/loader_base.jpg";
4
- import { inRangeRandom } from "../../utils/utils";
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 MarkerBaseSVG from "../../img/marker.svg";
6
- import MarkerSelectedSVG from "../../img/marker_blue.svg";
7
- import SemanticsMapProtocol from "../../utils/SemanticsMapProtocol";
8
- import PanoraMapProtocol from "../../utils/PanoraMapProtocol";
9
- import { initIndoorEqualOnMap, DISABLED_LEVEL } from "../../utils/indoor";
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/dist/maplibre-gl.css";
13
- import maplibregl from "!maplibre-gl"; // DO NOT REMOVE THE "!": bundled builds breaks otherwise !!!
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
- maplibregl.workerClass = maplibreglWorker;
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
- async _postLoad() {
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
- // only picMarker could be draggable, don't for picMarkerPreview.
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 { SEMANTICS_OVERLAY_MINZOOM, SEMANTICS_OVERLAY_MAXZOOM } from "../../utils/SemanticsMapProtocol";
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
- getDistance, positionToXYZ, xyzToPosition,
6
- getRelativeHeading, BASE_PANORAMA_ID, isNullId,
7
- getRoadAbsoluteHeading,
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/index.css";
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; // eslint-disable-line import/no-unused-modules
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
- // nodeTransition.rotateTo.yaw += fromNodeHeading - toNodeHeading;
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 == "pic") {
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 == "pic") {
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 == "pic") {
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 == "pic" ? "none" : null;
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 == visible;
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 == 2 && this._myMarkers.markers[DRAW_ANNOT_RECT]) {
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 == 0) {
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 == 1) {
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) {} // eslint-disable-line no-empty
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) {} // eslint-disable-line no-empty
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, html, css } from "lit";
2
- import { fa } from "../../utils/widgets";
3
- import { panel, faSvg } from "../styles";
4
- import { faXmark } from "@fortawesome/free-solid-svg-icons/faXmark";
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, html, css } from "lit";
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, html, css, nothing } from "lit";
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 { faCircleExclamation } from "@fortawesome/free-solid-svg-icons/faCircleExclamation";
7
- import { faMagnifyingGlass } from "@fortawesome/free-solid-svg-icons/faMagnifyingGlass";
8
- import { faCircleNotch } from "@fortawesome/free-solid-svg-icons/faCircleNotch";
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
  /**