Skip to content

Commit

Permalink
Merge pull request #492 from geospoc/fix/map-container-ref-not-found
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni authored Sep 13, 2021
2 parents 4e13da6 + d7a7d1c commit 1742e55
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/map/mixins/withPrivateMethods.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import Vue from 'vue';
import { ref } from '@vue/composition-api';
import type { Ref } from '@vue/composition-api';

export default Vue.extend({
setup(_, context) {
const templateRefs: Ref<{
[key: string]: Vue | Element | Vue[] | Element[];
}> = ref(context.refs);
return { templateRefs };
},
methods: {
$_updateSyncedPropsFabric(prop, data) {
return () => {
Expand Down Expand Up @@ -59,7 +68,7 @@ export default Vue.extend({
if (this.accessToken) this.mapbox.accessToken = this.accessToken;
const map = new this.mapbox.Map({
...this._props,
container: this.$refs.container,
container: this.templateRefs.container,
style: this.mapStyle,
});
map.on('load', () => resolve(map));
Expand Down

0 comments on commit 1742e55

Please sign in to comment.