@panoramax/web-viewer 4.0.2-develop-b600651e → 4.0.2-develop-bf17cdfd
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/index.js +5 -5
- package/build/index.js.map +1 -1
- package/docs/09_Develop.md +6 -0
- package/package.json +1 -1
- package/src/components/menus/AnnotationsList.js +1 -0
- package/src/components/ui/Photo.js +12 -8
- package/src/translations/en.json +1 -0
- package/src/translations/fr.json +1 -0
- package/src/utils/services.js +1 -1
package/docs/09_Develop.md
CHANGED
|
@@ -58,6 +58,12 @@ This means that, when developing, if you want to check if your attributes are we
|
|
|
58
58
|
|
|
59
59
|
All third-party services URL (like geocoding API, OSM iD editor) are grouped into a dedicated `src/utils/services.js` file. You can easily change them to deploy a custom version of the viewer.
|
|
60
60
|
|
|
61
|
+
### Presets for semantics
|
|
62
|
+
|
|
63
|
+
The semantics system for sequences, pictures and annotations make use of __tagging presets__. These are JSON files hosted at [presets.panoramax.fr](https://presets.panoramax.fr/), they have their [dedicated Gitlab repository](https://gitlab.com/panoramax/server/tagging-presets).
|
|
64
|
+
|
|
65
|
+
In the viewer, they show up through icons and translated labels associated to pictures & annotations. If you want to change them, you have to edit them in Gitlab repository. Viewer automatically loads hosted files at start.
|
|
66
|
+
|
|
61
67
|
## Testing
|
|
62
68
|
|
|
63
69
|
We're trying to make Panoramax as reliable and secure as possible. To ensure this, we rely heavily on code testing. A variety of testing tools is made available:
|
package/package.json
CHANGED
|
@@ -58,6 +58,7 @@ export default class AnnotationsList extends LitElement {
|
|
|
58
58
|
_onPicChange() {
|
|
59
59
|
this._meta = this._parent?.psv?.getPictureMetadata();
|
|
60
60
|
delete this._prevPsvView;
|
|
61
|
+
this._selectedAnnotation = null;
|
|
61
62
|
|
|
62
63
|
// Load presets for annotations
|
|
63
64
|
if(this._meta && this._parent?.presetsManager) {
|
|
@@ -996,6 +996,7 @@ export default class Photo extends PSViewer {
|
|
|
996
996
|
fill: "var(--orange-transparent)",
|
|
997
997
|
cursor: "pointer",
|
|
998
998
|
},
|
|
999
|
+
tooltip: this._parent._t.pnx.semantics_annotation_tooltip,
|
|
999
1000
|
};
|
|
1000
1001
|
});
|
|
1001
1002
|
this._myMarkers.setMarkers(annotations);
|
|
@@ -1022,7 +1023,7 @@ export default class Photo extends PSViewer {
|
|
|
1022
1023
|
*/
|
|
1023
1024
|
focusOnAnnotation(id) {
|
|
1024
1025
|
if(!this.areAnnotationsVisible()) { this.toggleAllAnnotations(true); }
|
|
1025
|
-
this.unfocusAnnotation();
|
|
1026
|
+
this.unfocusAnnotation(true);
|
|
1026
1027
|
|
|
1027
1028
|
const annotationId = `annotation-${id}`;
|
|
1028
1029
|
this._myMarkers.updateMarker({
|
|
@@ -1043,8 +1044,9 @@ export default class Photo extends PSViewer {
|
|
|
1043
1044
|
/**
|
|
1044
1045
|
* Remove focus styling on annotations.
|
|
1045
1046
|
* @memberof Panoramax.components.ui.Photo#
|
|
1047
|
+
* @param {boolean} [skipEvent=false] Set to true to avoid launching annotations-unfocused event
|
|
1046
1048
|
*/
|
|
1047
|
-
unfocusAnnotation() {
|
|
1049
|
+
unfocusAnnotation(skipEvent = false) {
|
|
1048
1050
|
const selectedAnnotations = Object.keys(this._myMarkers.markers)
|
|
1049
1051
|
.filter(id => id.startsWith("annotation-") && this._myMarkers.markers[id]?.config?.data?.selected);
|
|
1050
1052
|
|
|
@@ -1063,12 +1065,14 @@ export default class Photo extends PSViewer {
|
|
|
1063
1065
|
});
|
|
1064
1066
|
});
|
|
1065
1067
|
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1068
|
+
if(!skipEvent) {
|
|
1069
|
+
/**
|
|
1070
|
+
* Event for pictures annotation unfocus
|
|
1071
|
+
* @event Panoramax.components.ui.Photo#annotations-unfocused
|
|
1072
|
+
* @type {Event}
|
|
1073
|
+
*/
|
|
1074
|
+
this.dispatchEvent(new Event("annotations-unfocused"));
|
|
1075
|
+
}
|
|
1072
1076
|
}
|
|
1073
1077
|
}
|
|
1074
1078
|
|
package/src/translations/en.json
CHANGED
|
@@ -179,6 +179,7 @@
|
|
|
179
179
|
"semantics_features_none": "No feature has been detected or annotated in this picture yet.",
|
|
180
180
|
"semantics_features_default_title": "Feature #{nb}",
|
|
181
181
|
"semantics_features_subtitle": "{nb} associated properties",
|
|
182
|
+
"semantics_annotation_tooltip": "Click to see details",
|
|
182
183
|
"semantics_show_all_tags": "Show all tags",
|
|
183
184
|
"semantics_hide_all_tags": "Hide all tags",
|
|
184
185
|
"semantics_key": "Key",
|
package/src/translations/fr.json
CHANGED
|
@@ -179,6 +179,7 @@
|
|
|
179
179
|
"semantics_features_none": "Aucun objet n'a été détecté ou annoté dans cette photo pour l'instant.",
|
|
180
180
|
"semantics_features_default_title": "Objet #{nb}",
|
|
181
181
|
"semantics_features_subtitle": "{nb} attributs associés",
|
|
182
|
+
"semantics_annotation_tooltip": "Cliquez pour voir les détails",
|
|
182
183
|
"semantics_show_all_tags": "Voir tous les attributs",
|
|
183
184
|
"semantics_hide_all_tags": "Masquer les attributs",
|
|
184
185
|
"semantics_key": "Clé",
|