mapbox / mapbox/mapbox-gl-draw

MapboxDraw.modes is undefined

Open
#683 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug refactor
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

**mapbox-gl-js version**: v0.39.1
**mapbox-gl-draw version**: v0.19.0

### Steps to Trigger Behavior

1. `console.log(MapboxDraw.modes)`

### Expected Behavior

[API](https://github.com/mapbox/mapbox-gl-draw/blob/master/docs/API.md) states that

> modes, Object: over ride the default modes with your own. MapboxDraw.modes can be used to see the default values

### Actual Behavior

`MapboxDraw.modes` is undefined

### Side notes

I'm using both mapboxgl and mapboxgldraw from a CDN in the browser, using globals from `window`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the modes section of docs/API.md and reproduce console.log(MapboxDraw.modes) with the reported CDN globals and versions. Compare the documented API with the actual browser behavior; done means the documented access to default modes works or the documentation accurately reflects the supported API.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.