Unverified Commit 939a7c8a authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera Committed by GitHub
Browse files

Merge pull request #43 from vue-leaflet/emit-map-ready

Emit `ready` event after Leaflet map is loaded
parents 92dbf8a7 a112056f
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -5,7 +5,14 @@
</template>

<script>
import { onMounted, onBeforeUnmount, computed, reactive, ref } from "vue";
import {
  onMounted,
  onBeforeUnmount,
  computed,
  reactive,
  ref,
  nextTick,
} from "vue";
import {
  remapEvents,
  propsBinder,
@@ -345,6 +352,7 @@ export default {
      );
      DomEvent.on(blueprint.leafletRef, listeners);
      blueprint.ready = true;
      nextTick(() => context.emit("ready"));
    });

    onBeforeUnmount(() => {