Merge branch 'master' of github.com:antvis/L7

This commit is contained in:
thinkinggis 2021-01-14 16:19:08 +08:00
commit 46be5ae946
1 changed files with 3 additions and 0 deletions

View File

@ -155,6 +155,9 @@ export function printCanvas(canvas: HTMLCanvasElement) {
export function getViewPortScale() {
const meta = document.querySelector('meta[name="viewport"]');
if (!meta) {
return 1;
}
const contentItems = (meta as any).content?.split(',');
const scale = contentItems.find((item: string) => {
const [key, value] = item.split('=');