mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 08:46:43 +01:00
fix: correct note-map resizing
This commit is contained in:
@@ -55,7 +55,14 @@ export default class NoteMapWidget extends NoteContextAwareWidget {
|
||||
this.$container = this.$widget.find(".note-map-container");
|
||||
this.$styleResolver = this.$widget.find('.style-resolver');
|
||||
|
||||
window.addEventListener('resize', () => this.setDimensions(), false);
|
||||
|
||||
try {
|
||||
new ResizeObserver(() => this.setDimensions()).observe(this.$container[0])
|
||||
} catch (error) {
|
||||
window.addEventListener('resize', () => this.setDimensions(), false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.$widget.find(".map-type-switcher button").on("click", async e => {
|
||||
const type = $(e.target).closest("button").attr("data-type");
|
||||
|
||||
Reference in New Issue
Block a user