Skip to content

Commit

Permalink
Merge branch 'release/2.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Jan 11, 2023
2 parents 5954467 + 06cb705 commit a07282f
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format

## [Unreleased]

## [v2.0.4](https://github.com/studiometa/vue-mapbox-gl/compare/2.0.3...2.0.4) (2023-01-11)

### Fixed

- Fix a bug where controls could be accessed before being added to the map ([eefaee2](https://github.com/studiometa/vue-mapbox-gl/commit/eefaee2), fix [#77](https://github.com/studiometa/vue-mapbox-gl/issues/77))
- Fix doc regarding access token ([#78](https://github.com/studiometa/vue-mapbox-gl/pull/78), fix [#67](https://github.com/studiometa/vue-mapbox-gl/issues/67))

## [v2.0.3](https://github.com/studiometa/vue-mapbox-gl/compare/2.0.2...2.0.3) (2023-01-10)

### Fixed
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@studiometa/vue-mapbox-gl-workspace",
"private": true,
"version": "2.0.3",
"version": "2.0.4",
"workspaces": [
"packages/*"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/vue-mapbox-gl-demo",
"version": "2.0.3",
"version": "2.0.4",
"scripts": {
"dev": "nuxt dev",
"build": "nuxt build"
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/components/MapboxMap/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ You will probably need to use the Mapbox instance to use some of its methods suc
- Type `String`
- Required `true`

Your Mapbox access token or `no-token` if you are not using a map style from Mapbox.
Your Mapbox access token.

### `mapStyle`

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/components/StoreLocator/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The zoom level to use when zooming in on an item.
- Type `String`
- Default `no-token`

Your Mapbox access token or no-token if you are not using a map style from Mapbox.
Your Mapbox access token.

### `mapboxMap`

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@studiometa/vue-mapbox-gl-docs",
"private": true,
"version": "2.0.3",
"version": "2.0.4",
"scripts": {
"dev": "vitepress",
"build": "vitepress build"
Expand Down
5 changes: 3 additions & 2 deletions packages/vue-mapbox-gl/composables/useControl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { onMounted, onUnmounted, ref, unref, watch } from 'vue';
import { onMounted, onUnmounted, ref, unref, watch, nextTick } from 'vue';
import { useMap } from './useMap.js';
import { useEventsBinding } from './useEventsBinding.js';
import { usePropsBinding } from './usePropsBinding.js';
Expand Down Expand Up @@ -35,13 +35,14 @@ export function useControl(ControlConstructor, { propsConfig, props, emit, event
}
);

onMounted(() => {
onMounted(async () => {
const ctrl = new ControlConstructor(props);

if (unref(map)) {
unref(map).addControl(ctrl, props.position);
}

await nextTick();
control.value = ctrl;
});

Expand Down
2 changes: 1 addition & 1 deletion packages/vue-mapbox-gl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/vue-mapbox-gl",
"version": "2.0.3",
"version": "2.0.4",
"description": "A small components library to use Mapbox GL in Vue 3.",
"homepage": "https://github.com/studiometa/vue-mapbox-gl#readme",
"bugs": {
Expand Down

0 comments on commit a07282f

Please sign in to comment.