@panoramax/web-viewer 4.0.3-develop-885abb56 → 4.0.3-develop-23ff1114

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.
@@ -79,7 +79,9 @@ jest.mock("maplibre-gl", () => ({
79
79
  GeolocateControl: class {
80
80
  onAdd() {;}
81
81
  },
82
- Marker: jest.fn(),
82
+ Marker: class {
83
+ setDraggable() {;}
84
+ },
83
85
  Popup: function() {
84
86
  return {
85
87
  on: jest.fn(),
@@ -51,6 +51,7 @@ A shorthand `addEventListener` function is added for simpler usage.
51
51
  | [options.raster] | <code>object</code> | | The MapLibre raster source for aerial background. This must be a JSON object following [MapLibre raster source definition](https://maplibre.org/maplibre-style-spec/sources/#raster). |
52
52
  | [options.background] | <code>string</code> | <code>&quot;streets&quot;</code> | Choose default map background to display (streets or aerial, if raster aerial background available). Defaults to street. |
53
53
  | [options.attributionControl.customAttribution] | <code>string</code> | | To override default map attribution. |
54
+ | [options.picMarkerDraggable] | boolean | false | To make the picture marker draggable, default to false. |
54
55
 
55
56
  **Example**
56
57
  ```js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "4.0.3-develop-885abb56",
3
+ "version": "4.0.3-develop-23ff1114",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
@@ -149,6 +149,7 @@ export default class Editor extends Basic {
149
149
  background: this.background,
150
150
  supplementaryStyle: this._createMapStyle(),
151
151
  zoom: 15, // Hack to avoid _initMapPosition call
152
+ picMarkerDraggable: true,
152
153
  });
153
154
  linkMapAndPhoto(this);
154
155
  this.loader.setAttribute("value", 50);
@@ -37,6 +37,7 @@ maplibregl.addProtocol("pmtiles", new pmtiles.Protocol().tile);
37
37
  * @param {object} [options.raster] The MapLibre raster source for aerial background. This must be a JSON object following [MapLibre raster source definition](https://maplibre.org/maplibre-style-spec/sources/#raster).
38
38
  * @param {string} [options.background=streets] Choose default map background to display (streets or aerial, if raster aerial background available). Defaults to street.
39
39
  * @param {string} [options.attributionControl.customAttribution] To override default map attribution.
40
+ * @param {boolean} [options.picMarkerDraggable] To make the picture marker draggable, default to false.
40
41
  * @fires Panoramax.components.ui.Map#background-changed
41
42
  * @fires Panoramax.components.ui.Map#users-changed
42
43
  * @fires Panoramax.components.ui.Map#sequence-hover
@@ -884,7 +885,10 @@ export default class Map extends maplibregl.Map {
884
885
  return new maplibregl.Marker({
885
886
  element: img,
886
887
  picId: null
887
- });
888
+ })
889
+ // only picMarker could be draggable, don't for picMarkerPreview.
890
+ .setDraggable(selected && this._options.picMarkerDraggable)
891
+ ;
888
892
  }
889
893
 
890
894
  /**
@@ -139,7 +139,7 @@
139
139
  "metadata_camera_type": "Type",
140
140
  "metadata_camera_resolution": "Resolutie",
141
141
  "metadata_camera_focal_length": "Brandpuntsafstand",
142
- "metadata_location": "Locatie",
142
+ "metadata_location": "Positie",
143
143
  "metadata_location_longitude": "Longitude",
144
144
  "metadata_location_latitude": "Latitude",
145
145
  "metadata_location_orientation": "Richting",