Skip to content

Commit a9ac194

Browse files
authored
Fixes Problem relating imagemaps and messed up bounds when returning from markdown view (#417)
* fix: bounds (on imagemap) messed up after onload returning from markup view * chore: add documentation
1 parent b426a28 commit a9ac194

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/renderer/renderer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ export class LeafletRenderer extends MarkdownRenderChild {
352352
await this.mapBuilt;
353353
this.map.log("MarkdownRenderChild loaded. Appending map.");
354354
this.containerEl.appendChild(this.map.contentEl);
355+
// added because bound's get somehow messed up in the render process and only normalize when calling this.
356+
// haven't found the cause of the issue, but that seems to work around it. see issue #412
357+
this.map.leafletInstance.invalidateSize();
355358

356359
if (!this.parentEl.contains(this.containerEl)) {
357360
this.map.log(

0 commit comments

Comments
 (0)