@panoramax/web-viewer 5.1.1-develop-aa6352db → 5.1.1-develop-177481f2

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.
@@ -9,7 +9,7 @@ import BasicStyles from "./Basic.css" with { type: "css" };
9
9
  document.adoptedStyleSheets.push(AtkinsonStyles);
10
10
  document.adoptedStyleSheets.push(BasicStyles);
11
11
 
12
- const __COMMIT_HASH__ = "aa6352d";
12
+ const __COMMIT_HASH__ = "177481f";
13
13
  const __PACKAGE_VERSION__ = "5.1.1";
14
14
  const __PACKAGE_ISSUES_URL__ = "https://gitlab.com/panoramax/clients/web-viewer/-/work_items";
15
15
 
@@ -469,6 +469,7 @@ export default class MapFilters extends LitElement {
469
469
  .searcher=${this._userSearch.bind(this)}
470
470
  ._parent=${this._parent}
471
471
  no-menu-closure
472
+ keep-on-menu-closure
472
473
  >
473
474
  </pnx-search-bar>
474
475
  </div>
@@ -142,7 +142,7 @@ export default class SemanticsMetadata extends LitElement {
142
142
  this._blockPicChange(true);
143
143
  this._addTag = true;
144
144
  this._editTag = false;
145
- this._addTagGeom = ADD_TAG_GEOM_DOING;
145
+ this._addTagGeom = null;
146
146
  this._editTagSem = null;
147
147
 
148
148
  this._addTagGeomListener = e => {
@@ -150,6 +150,7 @@ export default class SemanticsMetadata extends LitElement {
150
150
  this._addTagGeom = e.detail.shape;
151
151
  };
152
152
  this._parent.psv.addEventListener("annotation-drawn", this._addTagGeomListener);
153
+ this._parent.psv.addEventListener("annotation-drawing", () => this._addTagGeom = ADD_TAG_GEOM_DOING);
153
154
  this._parent.psv.startDrawAnnotation();
154
155
  }
155
156
 
@@ -105,6 +105,8 @@ const keepOnlyPSVOptions = opts => Object.fromEntries(
105
105
  * @fires Panoramax.components.ui.Photo#annotations-toggled
106
106
  * @fires Panoramax.components.ui.Photo#annotation-click
107
107
  * @fires Panoramax.components.ui.Photo#annotation-focused
108
+ * @fires Panoramax.components.ui.Photo#annotation-drawn
109
+ * @fires Panoramax.components.ui.Photo#annotation-drawing
108
110
  * @fires Panoramax.components.ui.Photo#annotations-unfocused
109
111
  * @example
110
112
  * const psv = new Panoramax.components.ui.Photo(viewer, psvNode, {transitionDuration: 500})
@@ -1317,6 +1319,14 @@ export default class Photo extends PSViewer {
1317
1319
  if(this._drawingMoves !== 2 && e.marker.id === DRAW_ANNOT_1ST) {
1318
1320
  // First time ? Start moving second vertex
1319
1321
  if(this._drawingAnnotation.length === 0) {
1322
+ /**
1323
+ * Event for annotation drawing started
1324
+ *
1325
+ * @event Panoramax.components.ui.Photo#annotation-drawing
1326
+ * @type {Event}
1327
+ */
1328
+ this.dispatchEvent(new Event("annotation-drawing"));
1329
+
1320
1330
  this._drawingAnnotation.push({ yaw: e.marker.config.position.yaw, pitch: e.marker.config.position.pitch });
1321
1331
  this.parent.removeEventListener("mousemove", firstMove);
1322
1332
  this._myMarkers.updateMarker({
@@ -116,6 +116,7 @@ export default class SearchBar extends LitElement {
116
116
  * @property {string} [size=md] The component sizing (md, xxl)
117
117
  * @property {function} [searcher] Search callback, function that takes as parameter the input text value, and resolves on list of results ({title, subtitle} and any other data you'd like to get on validation)
118
118
  * @property {boolean} [no-menu-closure=false] Set to true to not send menu closure events. Note that it still listens to other menu closures.
119
+ * @property {boolean} [keep-on-menu-closure=false] Set to true to keep last data in search bar on menu closure.
119
120
  */
120
121
  static properties = {
121
122
  id: {type: String},
@@ -128,6 +129,7 @@ export default class SearchBar extends LitElement {
128
129
  _results: {state: true},
129
130
  searcher: {type: Function},
130
131
  "no-menu-closure": {type: Boolean},
132
+ "keep-on-menu-closure": {type: Boolean},
131
133
  };
132
134
 
133
135
  constructor() {
@@ -141,6 +143,7 @@ export default class SearchBar extends LitElement {
141
143
  this._icon = "search";
142
144
  this._results = null;
143
145
  this["no-menu-closure"] = false;
146
+ this["keep-on-menu-closure"] = false;
144
147
 
145
148
  // Other properties
146
149
  this._throttler = null;
@@ -300,7 +303,9 @@ export default class SearchBar extends LitElement {
300
303
  this._popup._parent = this._parent;
301
304
  this._popup.classList.add("sb-results", "pnx-panel");
302
305
  this._parent.renderRoot.appendChild(this._popup);
303
- listenForMenuClosure(this._popup, this.reset.bind(this));
306
+ if(!this["keep-on-menu-closure"]) {
307
+ listenForMenuClosure(this._popup, this.reset.bind(this));
308
+ }
304
309
  }
305
310
 
306
311
  if(!this.reduced && this._results) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "5.1.1-develop-aa6352db",
3
+ "version": "5.1.1-develop-177481f2",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "./build/cjs/index.js",
6
6
  "module": "./build/esm/index.js",