@panoramax/web-viewer 5.0.0-develop-b98e5d13 → 5.0.0-develop-c36ee660
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/build/cjs/index.js +38 -38
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index_photoviewer.js +31 -31
- package/build/cjs/index_photoviewer.js.map +1 -1
- package/build/esm/components/core/Basic.js +1 -1
- package/build/esm/components/menus/SemanticsMetadata.js +8 -1
- package/build/esm/components/ui/Photo.js +8 -1
- package/build/esm/translations/en.json +2 -0
- package/build/esm/translations/fr.json +2 -0
- package/package.json +1 -1
|
@@ -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__ = "
|
|
12
|
+
const __COMMIT_HASH__ = "c36ee66";
|
|
13
13
|
const __PACKAGE_VERSION__ = "5.0.0";
|
|
14
14
|
const __PACKAGE_ISSUES_URL__ = "https://gitlab.com/panoramax/clients/web-viewer/-/work_items";
|
|
15
15
|
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
import { dataBlocks, hidden } from "../styles.js";
|
|
7
7
|
import { getUserAccount } from "../../utils/utils.js";
|
|
8
8
|
|
|
9
|
+
const ADD_TAG_GEOM_DOING = "doing";
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* Semantics metadata displays detailed info about semantic attributes of a single picture.
|
|
11
13
|
* @class Panoramax.components.menus.SemanticsMetadata
|
|
@@ -108,6 +110,7 @@ export default class SemanticsMetadata extends LitElement {
|
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
/** @private */
|
|
113
|
+
// eslint-disable-next-line class-methods-use-this
|
|
111
114
|
_onBrowserQuit(e) {
|
|
112
115
|
e.preventDefault();
|
|
113
116
|
e.returnValue = true;
|
|
@@ -139,7 +142,7 @@ export default class SemanticsMetadata extends LitElement {
|
|
|
139
142
|
this._blockPicChange(true);
|
|
140
143
|
this._addTag = true;
|
|
141
144
|
this._editTag = false;
|
|
142
|
-
this._addTagGeom =
|
|
145
|
+
this._addTagGeom = ADD_TAG_GEOM_DOING;
|
|
143
146
|
this._editTagSem = null;
|
|
144
147
|
|
|
145
148
|
this._addTagGeomListener = e => {
|
|
@@ -177,6 +180,10 @@ export default class SemanticsMetadata extends LitElement {
|
|
|
177
180
|
alert(this._parent?._t.pnx.semantics_send_fail);
|
|
178
181
|
});
|
|
179
182
|
}
|
|
183
|
+
// Create annotation but with unfinished geom
|
|
184
|
+
else if(this._addTag && this._addTagGeom === ADD_TAG_GEOM_DOING) {
|
|
185
|
+
alert(this._parent?._t.pnx.semantics_draw_unfinished_annotation);
|
|
186
|
+
}
|
|
180
187
|
// Create annotation if a geom exists
|
|
181
188
|
else if(this._addTag && this._addTagGeom) {
|
|
182
189
|
this._parent.psv.fixDrawAnnotation();
|
|
@@ -1392,10 +1392,17 @@ export default class Photo extends PSViewer {
|
|
|
1392
1392
|
else if(shape[1] < 0 || shape[1] > crop.croppedHeight) { shape = null; }
|
|
1393
1393
|
else if(shape[2] < 0 || shape[2] > crop.croppedWidth) { shape = null; }
|
|
1394
1394
|
else if(shape[3] < 0 || shape[3] > crop.croppedHeight) { shape = null; }
|
|
1395
|
+
|
|
1396
|
+
// Alert user if shape is invalid
|
|
1397
|
+
if(!shape) {
|
|
1398
|
+
alert(this._parent._t.pnx.semantics_draw_invalid_annotation);
|
|
1399
|
+
this.stopDrawAnnotation();
|
|
1400
|
+
this.startDrawAnnotation();
|
|
1401
|
+
}
|
|
1395
1402
|
}
|
|
1396
1403
|
|
|
1397
1404
|
// Check coordinates order
|
|
1398
|
-
if(shape[0] >= shape[2] && shape[1] >= shape[3]) {
|
|
1405
|
+
if(shape && shape[0] >= shape[2] && shape[1] >= shape[3]) {
|
|
1399
1406
|
let maxx = shape[0];
|
|
1400
1407
|
let minx = shape[2];
|
|
1401
1408
|
let maxy = shape[1];
|
|
@@ -222,6 +222,8 @@
|
|
|
222
222
|
"semantics_zero_annotations": "No features drawn on this picture",
|
|
223
223
|
"semantics_add_annotation": "Add a new tag",
|
|
224
224
|
"semantics_draw_annotation": "You can draw the object you want to add over the picture (Optional).",
|
|
225
|
+
"semantics_draw_invalid_annotation": "The drawn area goes beyond picture limits. Please make sure to draw within visible picture.",
|
|
226
|
+
"semantics_draw_unfinished_annotation": "The drawn area is unfinished. Make sure the area is well-positioned before saving.",
|
|
225
227
|
"semantics_erase_annotation": "Erase drawn feature",
|
|
226
228
|
"semantics_delete_annotation": "Delete this feature",
|
|
227
229
|
"semantics_delete_annotation_confirm": "Do you really want to delete this tag ?",
|
|
@@ -222,6 +222,8 @@
|
|
|
222
222
|
"semantics_zero_annotations": "Aucun objet dessiné dans cette photo",
|
|
223
223
|
"semantics_add_annotation": "Ajouter un nouveau tag",
|
|
224
224
|
"semantics_draw_annotation": "Vous pouvez dessiner l'emplacement de l'objet à créer sur la photo (Optionnel).",
|
|
225
|
+
"semantics_draw_invalid_annotation": "La zone dessinée dépasse de la photo. Veuillez vous assurer que la zone dessinée soit bien à l'intérieur de la photo.",
|
|
226
|
+
"semantics_draw_unfinished_annotation": "La zone dessinée n'est pas terminée. Assurez-vous qu'elle soit bien positionnée avant d'enregistrer.",
|
|
225
227
|
"semantics_erase_annotation": "Effacer l'objet dessiné",
|
|
226
228
|
"semantics_delete_annotation": "Supprimer cet objet",
|
|
227
229
|
"semantics_delete_annotation_confirm": "Êtes-vous sûr(e) de vouloir supprimer ce tag ?",
|
package/package.json
CHANGED