Skip to content

Commit d917686

Browse files
authored
Merge pull request #14 from 2gis/TILES-4788-add-extend-types
fix documentation
2 parents 330204c + be474e0 commit d917686

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@2gis/deck2gis-layer",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"description": "",
55
"main": "dist/deck2gislayer.js",
66
"typings": "dist/types/index.d.ts",

src/deckgl2gisLayer.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,26 @@ import type Vao from '2gl/Vao';
1919
import type ShaderProgram from '2gl/ShaderProgram';
2020

2121
/**
22-
* A class that extends deck.gl's base Layer class.
22+
* The any Layer class from deck.gl.
2323
*/
24-
export type DeckBaseLayer = any;
24+
export type DeckLayer = any;
2525

2626
/**
27-
* Deck2gisLayer layer props
27+
* Deck2gisLayer required layer props.
2828
*/
29-
export interface DeckInternalLayerProps {
29+
export interface Deck2gisLayerProps {
3030
id: string;
3131
renderingMode?: '2d' | '3d';
3232
deck: Deck;
33-
type: DeckBaseLayer;
33+
type: DeckLayer;
3434
antialiasing?: boolean;
3535
}
3636

3737
/**
3838
* LayerProps is type extends from Layer:
3939
* https://deck.gl/docs/api-reference/core/layer
4040
*/
41-
export type LayerProps<LayerT extends Layer> = DeckInternalLayerProps & Partial<LayerT['props']>;
41+
export type LayerProps<LayerT extends Layer> = Deck2gisLayerProps & Partial<LayerT['props']>;
4242

4343
/**
4444
* A class that provides rendering any deck.gl layer inside the MapGl canvas / WebGL context.
@@ -53,6 +53,11 @@ export class Deck2gisLayer<LayerT extends Layer> implements DeckCustomLayer {
5353
gl?: WebGLRenderingContext | WebGL2RenderingContext;
5454
antialiasing: boolean;
5555

56+
/**
57+
* Initializes deck.gl properties for working with the MapGL map.
58+
* @param map The map instance.
59+
* @param deckProps CustomRenderProps initialization options.
60+
*/
5661
static initDeck2gisProps = (map: Map, deckProps?: CustomRenderProps) =>
5762
initDeck2gisProps(map, deckProps);
5863

0 commit comments

Comments
 (0)