diff --git a/.prettierignore b/.prettierignore index 136dc107b..d9b05ade3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,7 +3,10 @@ dist-esm dist-es6 dist-types +.cache +website/public/ + modules/edit-modes/README.md modules/editor/README.md modules/layers/README.md -modules/main/README.md \ No newline at end of file +modules/main/README.md diff --git a/docs/api-reference/layers/selection-layer.md b/docs/api-reference/layers/selection-layer.md index b665a8a68..568f32626 100644 --- a/docs/api-reference/layers/selection-layer.md +++ b/docs/api-reference/layers/selection-layer.md @@ -6,9 +6,9 @@ This layer can be used to select deck.gl objects using mouse drawing. import * as React from 'react'; import ReactDOM from 'react-dom'; import DeckGL from '@deck.gl/react'; -import {ScatterplotLayer} from '@deck.gl/layers'; -import {SelectionLayer} from '@nebula.gl/layers'; -import {StaticMap} from 'react-map-gl'; +import { ScatterplotLayer } from '@deck.gl/layers'; +import { SelectionLayer } from '@nebula.gl/layers'; +import { StaticMap } from 'react-map-gl'; const MAPBOX_ACCESS_TOKEN = ''; // add your mapbox token here @@ -23,11 +23,11 @@ const FEMALE_COLOR = [255, 0, 128]; const DATA_URL = 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/examples/scatterplot/manhattan.json'; // eslint-disable-line -const App = function() { +const App = function () { const radius = 30; const maleColor = MALE_COLOR; const femaleColor = FEMALE_COLOR; - const data = fetch(DATA_URL).then(resp => resp.json()) + const data = fetch(DATA_URL).then((resp) => resp.json()); const layers = [ new ScatterplotLayer({ @@ -35,36 +35,32 @@ const App = function() { data, radiusScale: radius, radiusMinPixels: 0.25, - getPosition: d => [d[0], d[1], 0], - getFillColor: d => (d[2] === 1 ? maleColor : femaleColor), + getPosition: (d) => [d[0], d[1], 0], + getFillColor: (d) => (d[2] === 1 ? maleColor : femaleColor), getRadius: 1, pickable: true, updateTriggers: { - getFillColor: [maleColor, femaleColor] - } + getFillColor: [maleColor, femaleColor], + }, }), new SelectionLayer({ id: 'selection', selectionType: 'rectangle', - onSelect: ({pickingInfos}) => { - }, + onSelect: ({ pickingInfos }) => {}, layerIds: ['scatter-plot'], getTentativeFillColor: () => [255, 0, 255, 100], getTentativeLineColor: () => [0, 0, 255, 255], getTentativeLineDashArray: () => [0, 0], - lineWidthMinPixels: 1 - })]; + lineWidthMinPixels: 1, + }), + ]; return ( - - + + ); -} +}; ``` ## Properties