Skip to content

Commit

Permalink
[docsprint] Add inline examples for Point & PointLike types (#9577)
Browse files Browse the repository at this point in the history
* Add inline examples for Point & PointLike types

* Correct syntax
  • Loading branch information
adrianababakanian authored Apr 20, 2020
1 parent 41f52a0 commit e5954f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ui/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -2798,10 +2798,15 @@ function removeNode(node) {
* `x` and `y` properties representing screen coordinates in pixels.
*
* @typedef {Object} Point
* @example
* var point = new mapboxgl.Point(-77, 38);
*/

/**
* A {@link Point} or an array of two numbers representing `x` and `y` screen coordinates in pixels.
*
* @typedef {(Point | Array<number>)} PointLike
* @example
* var p1 = new mapboxgl.Point(-77, 38); // a PointLike which is a Point
* var p2 = [-77, 38]; // a PointLike which is an array of two numbers
*/

0 comments on commit e5954f2

Please sign in to comment.