remove fallback resize window handlers, such old browsers are not supported

This commit is contained in:
zadam
2023-04-06 21:30:37 +02:00
parent e6adf3a522
commit 517f1992a1
3 changed files with 3 additions and 22 deletions

View File

@@ -55,14 +55,7 @@ export default class NoteMapWidget extends NoteContextAwareWidget {
this.$container = this.$widget.find(".note-map-container");
this.$styleResolver = this.$widget.find('.style-resolver');
try {
new ResizeObserver(() => this.setDimensions()).observe(this.$container[0])
} catch (error) {
window.addEventListener('resize', () => this.setDimensions(), false);
}
new ResizeObserver(() => this.setDimensions()).observe(this.$container[0])
this.$widget.find(".map-type-switcher button").on("click", async e => {
const type = $(e.target).closest("button").attr("data-type");