Skip to content

Commit e810f2c

Browse files
committed
Convenience zoom level card display
1 parent 04a760f commit e810f2c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/media/experimental_assets/_ug-interactive_map_config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ function getMapConfig() {
5151
stroke: configObj.commonColors.border,
5252
strokeWidth: 1
5353
}
54+
},
55+
onViewportChange(zoomLevel) {
56+
document.querySelector("body .zoom").textContent = zoomLevel;
5457
}
5558
};
5659
return configObj;

src/note_models/templates/Country - Map [Experimental].html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
}
2020
}));
2121
</script>
22+
<div class="zoom">0</div>
2223
<div class="value value--top">{{Country}}</div>
2324
<hr>
2425

@@ -46,6 +47,7 @@
4647

4748
--
4849

50+
<div class="zoom">0</div>
4951
<div class="value value--top">{{Country}}</div>
5052
{{#Country info}}<div class="info">{{Country info}}</div>{{/Country info}}
5153

0 commit comments

Comments
 (0)