@panoramax/web-viewer 3.2.1-develop-b82eccc7 → 3.2.1-develop-0f0a36ec
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/CHANGELOG.md +1 -0
- package/build/index.css +1 -1
- package/build/index.css.map +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +1 -1
- package/src/translations/fr.json +1 -1
- package/src/viewer/Widgets.css +25 -3
- package/src/viewer/Widgets.js +44 -25
package/package.json
CHANGED
package/src/translations/en.json
CHANGED
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"filter_user": "User",
|
|
100
100
|
"filter_user_mypics": "My pictures",
|
|
101
101
|
"filter_picture": "Picture type",
|
|
102
|
-
"filter_zoom_in": "Zoom-in
|
|
102
|
+
"filter_zoom_in": "Zoom-in to see this filter",
|
|
103
103
|
"picture_flat": "Classic",
|
|
104
104
|
"picture_360": "360°",
|
|
105
105
|
"filter_qualityscore": "Quality score",
|
package/src/translations/fr.json
CHANGED
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"qualityscore_doc_2": "Le score est affiché sous la forme d'une lettre A/B/C/D/E (A étant le meilleur, E le moins bon), et visualisable grâce à cette échelle :",
|
|
109
109
|
"qualityscore_doc_3": "Il est calculé en fonction de la précision du GPS ainsi que la résolution de la photo. Un matériel professionnel aura une note de A, une caméra sportive 360° une note de B, et un smartphone une note de C à E.",
|
|
110
110
|
"qualityscore_doc_link": "Plus d'infos sur le calcul du Score Qualité dans notre documentation.",
|
|
111
|
-
"filter_zoom_in": "Zoomez plus pour voir
|
|
111
|
+
"filter_zoom_in": "Zoomez plus pour voir ce filtre",
|
|
112
112
|
"map_background": "Fond de carte",
|
|
113
113
|
"map_background_aerial": "Satellite",
|
|
114
114
|
"map_background_streets": "Plan",
|
package/src/viewer/Widgets.css
CHANGED
|
@@ -669,6 +669,7 @@ a.gvs-btn { text-decoration: none; }
|
|
|
669
669
|
#gvs-filter-panel {
|
|
670
670
|
width: 350px;
|
|
671
671
|
max-width: 350px;
|
|
672
|
+
padding: 0;
|
|
672
673
|
}
|
|
673
674
|
#gvs-filter-panel .gvs-filter-active {
|
|
674
675
|
background-color: var(--widget-bg-active);
|
|
@@ -686,11 +687,32 @@ a.gvs-btn { text-decoration: none; }
|
|
|
686
687
|
color: var(--widget-font-active);
|
|
687
688
|
background: none;
|
|
688
689
|
}
|
|
689
|
-
|
|
690
|
+
.gvs-filter-block {
|
|
691
|
+
position: relative;
|
|
692
|
+
padding: 10px 15px;
|
|
693
|
+
border-bottom: 2px solid var(--widget-border-div);
|
|
694
|
+
}
|
|
695
|
+
.gvs-filter-block:first-child {
|
|
696
|
+
padding-top: 15px;
|
|
697
|
+
}
|
|
698
|
+
.gvs-filter-block:last-child {
|
|
699
|
+
border-bottom: none;
|
|
700
|
+
padding-bottom: 15px;
|
|
701
|
+
}
|
|
702
|
+
.gvs-filter-zoomin {
|
|
703
|
+
z-index: 10;
|
|
704
|
+
background-color: rgba(255,255,255,0.8);
|
|
690
705
|
text-align: center;
|
|
691
706
|
font-weight: bold;
|
|
692
|
-
|
|
693
|
-
|
|
707
|
+
position: absolute;
|
|
708
|
+
top: 0;
|
|
709
|
+
right: 0;
|
|
710
|
+
left: 0;
|
|
711
|
+
bottom: 0;
|
|
712
|
+
display: flex;
|
|
713
|
+
justify-content: center;
|
|
714
|
+
align-items: center;
|
|
715
|
+
border-radius: 25px;
|
|
694
716
|
}
|
|
695
717
|
|
|
696
718
|
#gvs-filter-qualityscore {
|
package/src/viewer/Widgets.js
CHANGED
|
@@ -1013,23 +1013,27 @@ export default class Widgets {
|
|
|
1013
1013
|
const pnlFilter = createPanel(this, btnFilter, []);
|
|
1014
1014
|
pnlFilter.innerHTML = `
|
|
1015
1015
|
<form id="gvs-filter-form">
|
|
1016
|
-
<div
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
<
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
<
|
|
1024
|
-
|
|
1025
|
-
|
|
1016
|
+
<div class="gvs-filter-block">
|
|
1017
|
+
<div class="gvs-filter-zoomin">${this._t.gvs.filter_zoom_in}</div>
|
|
1018
|
+
<h4>${fat(faCalendar)} ${this._t.gvs.filter_date}</h4>
|
|
1019
|
+
<div class="gvs-input-shortcuts">
|
|
1020
|
+
<button data-for="gvs-filter-date-from" data-value="${new Date(new Date().setMonth(new Date().getMonth() - 1)).toISOString().split("T")[0]}">${this._t.gvs.filter_date_1month}</button>
|
|
1021
|
+
<button data-for="gvs-filter-date-from" data-value="${new Date(new Date().setFullYear(new Date().getFullYear() - 1)).toISOString().split("T")[0]}">${this._t.gvs.filter_date_1year}</button>
|
|
1022
|
+
</div>
|
|
1023
|
+
<div class="gvs-input-group">
|
|
1024
|
+
<input type="date" id="gvs-filter-date-from" />
|
|
1025
|
+
${fat(faArrowRight)}
|
|
1026
|
+
<input type="date" id="gvs-filter-date-end" />
|
|
1027
|
+
</div>
|
|
1026
1028
|
</div>
|
|
1027
|
-
<
|
|
1028
|
-
|
|
1029
|
-
<
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1029
|
+
<div class="gvs-filter-block">
|
|
1030
|
+
<h4>${fat(faImage)} ${this._t.gvs.filter_picture}</h4>
|
|
1031
|
+
<div class="gvs-input-group gvs-checkbox-btns" style="justify-content: center;">
|
|
1032
|
+
<input type="checkbox" id="gvs-filter-type-flat" name="flat" />
|
|
1033
|
+
<label for="gvs-filter-type-flat">${fat(faImage)} ${this._t.gvs.picture_flat}</label>
|
|
1034
|
+
<input type="checkbox" id="gvs-filter-type-360" name="360" />
|
|
1035
|
+
<label for="gvs-filter-type-360">${fat(faPanorama)} ${this._t.gvs.picture_360}</label>
|
|
1036
|
+
</div>
|
|
1033
1037
|
</div>
|
|
1034
1038
|
</form>
|
|
1035
1039
|
`;
|
|
@@ -1056,11 +1060,20 @@ export default class Widgets {
|
|
|
1056
1060
|
|
|
1057
1061
|
// Create qualityscore filter
|
|
1058
1062
|
if(hasQualityScore) {
|
|
1063
|
+
const block = document.createElement("div");
|
|
1064
|
+
block.classList.add("gvs-filter-block");
|
|
1065
|
+
form.appendChild(block);
|
|
1066
|
+
|
|
1067
|
+
const zoomLbl = document.createElement("div");
|
|
1068
|
+
zoomLbl.classList.add("gvs-filter-zoomin");
|
|
1069
|
+
zoomLbl.appendChild(document.createTextNode(this._t.gvs.filter_zoom_in));
|
|
1070
|
+
block.appendChild(zoomLbl);
|
|
1071
|
+
|
|
1059
1072
|
const title = document.createElement("h4");
|
|
1060
1073
|
title.innerHTML = `${fat(faMedal)} ${this._t.gvs.filter_qualityscore} <button class="gvs-btn-link" title="${this._t.gvs.metadata_quality_help}">${fat(faInfoCircle)}</button>`;
|
|
1061
1074
|
title.style.marginBottom = "3px";
|
|
1062
1075
|
title.lastChild.addEventListener("click", () => this._showQualityScoreDoc());
|
|
1063
|
-
|
|
1076
|
+
block.appendChild(title);
|
|
1064
1077
|
|
|
1065
1078
|
const div = document.createElement("div");
|
|
1066
1079
|
div.id = "gvs-filter-qualityscore";
|
|
@@ -1083,14 +1096,18 @@ export default class Widgets {
|
|
|
1083
1096
|
div.appendChild(label);
|
|
1084
1097
|
});
|
|
1085
1098
|
|
|
1086
|
-
|
|
1099
|
+
block.appendChild(div);
|
|
1087
1100
|
}
|
|
1088
1101
|
|
|
1089
1102
|
// Create search bar for users
|
|
1090
1103
|
if(hasUserSearch) {
|
|
1104
|
+
const block = document.createElement("div");
|
|
1105
|
+
block.classList.add("gvs-filter-block");
|
|
1106
|
+
form.appendChild(block);
|
|
1107
|
+
|
|
1091
1108
|
const title = document.createElement("h4");
|
|
1092
1109
|
title.innerHTML = `${fat(faUser)} ${this._t.gvs.filter_user}`;
|
|
1093
|
-
|
|
1110
|
+
block.appendChild(title);
|
|
1094
1111
|
|
|
1095
1112
|
// Shortcut for my own pictures
|
|
1096
1113
|
const userAccount = getUserAccount();
|
|
@@ -1101,7 +1118,7 @@ export default class Widgets {
|
|
|
1101
1118
|
mypics = document.createElement("button");
|
|
1102
1119
|
mypics.appendChild(document.createTextNode(this._t.gvs.filter_user_mypics));
|
|
1103
1120
|
shortcuts.appendChild(mypics);
|
|
1104
|
-
|
|
1121
|
+
block.appendChild(shortcuts);
|
|
1105
1122
|
}
|
|
1106
1123
|
|
|
1107
1124
|
const input = document.createElement("div");
|
|
@@ -1130,12 +1147,12 @@ export default class Widgets {
|
|
|
1130
1147
|
this,
|
|
1131
1148
|
true
|
|
1132
1149
|
);
|
|
1133
|
-
|
|
1150
|
+
block.addEventListener("reset", () => {
|
|
1134
1151
|
userSearch.classList.remove("gvs-filter-active");
|
|
1135
1152
|
userSearch.resetSearch();
|
|
1136
1153
|
});
|
|
1137
1154
|
input.appendChild(userSearch);
|
|
1138
|
-
|
|
1155
|
+
block.appendChild(input);
|
|
1139
1156
|
|
|
1140
1157
|
// Trigger "my pictures" shortcut action
|
|
1141
1158
|
if(userAccount) {
|
|
@@ -1300,10 +1317,12 @@ export default class Widgets {
|
|
|
1300
1317
|
});
|
|
1301
1318
|
|
|
1302
1319
|
// Show/hide zoom in warning when map zoom changes
|
|
1303
|
-
const
|
|
1320
|
+
const lblsZoomIn = document.getElementsByClassName("gvs-filter-zoomin");
|
|
1304
1321
|
const changeLblZoomInDisplay = () => {
|
|
1305
|
-
|
|
1306
|
-
|
|
1322
|
+
for(let lblZoomIn of lblsZoomIn) {
|
|
1323
|
+
if(this._viewer.map.getZoom() < 7) { lblZoomIn.style.display = null; }
|
|
1324
|
+
else { lblZoomIn.style.display = "none"; }
|
|
1325
|
+
}
|
|
1307
1326
|
};
|
|
1308
1327
|
changeLblZoomInDisplay();
|
|
1309
1328
|
this._viewer.map.on("zoomend", changeLblZoomInDisplay);
|