mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 02:43:59 +00:00
map invalidate size
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { onMount } from 'svelte';
|
import { onMount, tick } from 'svelte';
|
||||||
import 'leaflet/dist/leaflet.css';
|
import 'leaflet/dist/leaflet.css';
|
||||||
import leaflet from 'leaflet';
|
import leaflet from 'leaflet';
|
||||||
import wellknown from 'wellknown';
|
import wellknown from 'wellknown';
|
||||||
import { isWktGeometry } from 'dbgate-tools';
|
import { isWktGeometry } from 'dbgate-tools';
|
||||||
|
import resizeObserver from '../utility/resizeObserver';
|
||||||
|
|
||||||
// import Map from 'ol/Map';
|
// import Map from 'ol/Map';
|
||||||
// import View from 'ol/View';
|
// import View from 'ol/View';
|
||||||
@@ -140,4 +141,12 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={refContainer} class="flex1" />
|
<div
|
||||||
|
bind:this={refContainer}
|
||||||
|
class="flex1"
|
||||||
|
use:resizeObserver={true}
|
||||||
|
on:resize={async e => {
|
||||||
|
await tick();
|
||||||
|
map.invalidateSize();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user