@panoramax/web-viewer 3.2.3-develop-a4cbf815 → 3.2.3-develop-d245268c
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.js +5 -5
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/menus/MapFilters.js +14 -15
package/package.json
CHANGED
|
@@ -262,18 +262,17 @@ export default class MapFilters extends LitElement {
|
|
|
262
262
|
this._onFormChange();
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
/**
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
};
|
|
265
|
+
/** @private */
|
|
266
|
+
_onDateShortcut(date) {
|
|
267
|
+
const dateFromField = this.shadowRoot.getElementById("pnx-filter-date-from");
|
|
268
|
+
const dateToField = this.shadowRoot.getElementById("pnx-filter-date-end");
|
|
269
|
+
|
|
270
|
+
if(dateFromField) {
|
|
271
|
+
if(dateFromField.value !== date) { dateFromField.value = date; }
|
|
272
|
+
else { dateFromField.value = ""; }
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if(dateToField) { dateToField.value = ""; }
|
|
277
276
|
}
|
|
278
277
|
|
|
279
278
|
/** @private */
|
|
@@ -290,13 +289,13 @@ export default class MapFilters extends LitElement {
|
|
|
290
289
|
<h4>${fa(faCalendar)} ${this._parent?._t.pnx.filter_date}</h4>
|
|
291
290
|
<div class="pnx-input-shortcuts">
|
|
292
291
|
<button
|
|
293
|
-
@click=${this.
|
|
292
|
+
@click=${() => this._onDateShortcut(new Date(new Date().setMonth(new Date().getMonth() - 1)).toISOString().split("T")[0])}
|
|
294
293
|
>${this._parent?._t.pnx.filter_date_1month}</button>
|
|
295
294
|
<button
|
|
296
|
-
@click=${this.
|
|
295
|
+
@click=${() => this._onDateShortcut(new Date(new Date().setMonth(new Date().getMonth() - 6)).toISOString().split("T")[0])}
|
|
297
296
|
>${this._parent?._t.pnx.filter_date_6months}</button>
|
|
298
297
|
<button
|
|
299
|
-
@click=${this.
|
|
298
|
+
@click=${() => this._onDateShortcut(new Date(new Date().setFullYear(new Date().getFullYear() - 1)).toISOString().split("T")[0])}
|
|
300
299
|
>${this._parent?._t.pnx.filter_date_1year}</button>
|
|
301
300
|
</div>
|
|
302
301
|
<div class="pnx-input-group">
|