Skip to content

Commit f75836a

Browse files
committed
fix: Fixes another instance where image markers might not resize properly
1 parent ba94896 commit f75836a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/modals/settings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ export class CreateMarkerModal extends Modal {
176176
const max_size = 24;
177177
let width = image.width,
178178
height = image.height;
179-
if (width > height && width > max_size) {
179+
if (width >= height && width > max_size) {
180180
height *= max_size / width;
181181
width = max_size;
182-
} else if (height > width && height > max_size) {
182+
} else if (height >= width && height > max_size) {
183183
width *= max_size / height;
184184
height = max_size;
185185
}

src/settings/settings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ export class ObsidianLeafletSettingTab extends PluginSettingTab {
175175
max_size = 24;
176176
let width = image.width,
177177
height = image.height;
178-
if (width > height && width > max_size) {
178+
if (width >= height && width > max_size) {
179179
height *= max_size / width;
180180
width = max_size;
181-
} else if (height > width && height > max_size) {
181+
} else if (height >= width && height > max_size) {
182182
width *= max_size / height;
183183
height = max_size;
184184
}

0 commit comments

Comments
 (0)