Skip to content

Commit

Permalink
Merge pull request #4 from wherobots/sync-fork
Browse files Browse the repository at this point in the history
Sync to vis.gl/deckgl/master
  • Loading branch information
james-willis authored Apr 11, 2024
2 parents d5a49b6 + c4c1543 commit a0385f7
Show file tree
Hide file tree
Showing 35 changed files with 260 additions and 142 deletions.
3 changes: 2 additions & 1 deletion bindings/pydeck/pydeck/io/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def in_jupyter():


def convert_js_bool(py_bool):
if type(py_bool) is bool:
"""Serializes Python booleans to JavaScript. Returns non-boolean values unchanged."""
if type(py_bool) is not bool:
return py_bool
return "true" if py_bool else "false"

Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/extensions/data-filter-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ new deck.DataFilterExtension({});
new DataFilterExtension({filterSize, fp64});
```

* `filterSize` (number) - the size of the filter (number of columns to filter by). The data filter can show/hide data based on 1-4 numeric properties of each object. Default `1`.
* `categorySize` (number) - the size of the category filter (number of columns to filter by). The category filter can show/hide data based on 1-4 properties of each object. Default `1`.
* `filterSize` (number) - the size of the filter (number of columns to filter by). The data filter can show/hide data based on 1-4 numeric properties of each object. Set to `0` to disable numeric filtering. Default `1`.
* `categorySize` (number) - the size of the category filter (number of columns to filter by). The category filter can show/hide data based on 1-4 properties of each object. Set to `0` to disable category filtering. Default `0`.
* `fp64` (boolean) - if `true`, use 64-bit precision instead of 32-bit. Default `false`. See the "remarks" section below for use cases and limitations.
* `countItems` (boolean) - if `true`, reports the number of filtered objects with the `onFilteredItemsChange` callback. Default `false`.

Expand Down
4 changes: 2 additions & 2 deletions examples/layer-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"start-local": "vite --config ../vite.config.local.mjs"
},
"dependencies": {
"@loaders.gl/ply": "^4.1.4",
"@loaders.gl/gltf": "^4.1.4",
"@loaders.gl/ply": "^4.2.0",
"@loaders.gl/gltf": "^4.2.0",
"colorbrewer": "^1.0.0",
"d3-request": "^1.0.6",
"d3-scale": "^3.1.0",
Expand Down
10 changes: 5 additions & 5 deletions examples/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/3d-tiles": "^4.1.4",
"@loaders.gl/core": "^4.1.4",
"@loaders.gl/csv": "^4.1.4",
"@loaders.gl/draco": "^4.1.4",
"@loaders.gl/gltf": "^4.1.4",
"@loaders.gl/3d-tiles": "^4.2.0",
"@loaders.gl/core": "^4.2.0",
"@loaders.gl/csv": "^4.2.0",
"@loaders.gl/draco": "^4.2.0",
"@loaders.gl/gltf": "^4.2.0",
"@luma.gl/constants": "^9.0.4",
"brace": "^0.11.1",
"deck.gl": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/3d-heatmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/csv": "^4.1.4",
"@loaders.gl/csv": "^4.2.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/3d-tiles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@loaders.gl/3d-tiles": "^4.1.4",
"@loaders.gl/3d-tiles": "^4.2.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"react": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/data-filter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@material-ui/core": "^4.10.2",
"@material-ui/icons": "^4.9.1",
"@loaders.gl/csv": "^4.1.4",
"@loaders.gl/csv": "^4.2.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/globe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/csv": "^4.1.4",
"@loaders.gl/csv": "^4.2.0",
"@material-ui/core": "^4.10.2",
"@material-ui/icons": "^4.9.1",
"@types/react": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/highway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/csv": "^4.1.4",
"@loaders.gl/csv": "^4.2.0",
"@types/d3-scale": "^4.0.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/i3s/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/i3s": "^4.1.4",
"@loaders.gl/i3s": "^4.2.0",
"deck.gl": "^9.0.0"
},
"devDependencies": {
Expand Down
7 changes: 3 additions & 4 deletions examples/website/map-pmtile/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ const LINK_STYLE = {
cursor: 'grab'
};

/* global window */
const devicePixelRatio = (typeof window !== 'undefined' && window.devicePixelRatio) || 1;

function getTooltip({tile}) {
if (tile) {
const {x, y, z} = tile.index;
Expand All @@ -41,7 +38,9 @@ function getTooltip({tile}) {
}

export default function App({showBorder = false, onTilesLoad = null}) {
const tileLayer = new PMTLayer({url: "https://r2-public.protomaps.com/protomaps-sample-datasets/protomaps-basemap-opensource-20230408.pmtiles"});
const tileLayer = new PMTLayer({
url: 'https://r2-public.protomaps.com/protomaps-sample-datasets/protomaps-basemap-opensource-20230408.pmtiles'
});

return (
<DeckGL
Expand Down
2 changes: 1 addition & 1 deletion examples/website/mapbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/csv": "^4.1.4",
"@loaders.gl/csv": "^4.2.0",
"d3-scale": "^4.0.0",
"deck.gl": "^9.0.0",
"mapbox-gl": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/mask-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/csv": "^4.1.4",
"@loaders.gl/csv": "^4.2.0",
"@material-ui/core": "^4.10.2",
"@material-ui/icons": "^4.9.1",
"@types/react": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/mesh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/obj": "^4.1.4",
"@loaders.gl/obj": "^4.2.0",
"@math.gl/core": "^4.0.0",
"deck.gl": "^9.0.0",
"react": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/point-cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/las": "^4.1.4",
"@loaders.gl/las": "^4.2.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/csv": "^4.1.4",
"@loaders.gl/csv": "^4.2.0",
"@material-ui/core": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.57",
"@types/d3-scale": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "vite build"
},
"dependencies": {
"@loaders.gl/csv": "^4.1.4",
"@loaders.gl/csv": "^4.2.0",
"@types/d3-scale": "^4.0.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
Expand Down
12 changes: 6 additions & 6 deletions modules/carto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@loaders.gl/gis": "^4.1.4",
"@loaders.gl/loader-utils": "^4.1.4",
"@loaders.gl/mvt": "^4.1.4",
"@loaders.gl/schema": "^4.1.4",
"@loaders.gl/tiles": "^4.1.4",
"@loaders.gl/gis": "^4.2.0",
"@loaders.gl/loader-utils": "^4.2.0",
"@loaders.gl/mvt": "^4.2.0",
"@loaders.gl/schema": "^4.2.0",
"@loaders.gl/tiles": "^4.2.0",
"@luma.gl/constants": "^9.0.9",
"@math.gl/web-mercator": "^4.0.0",
"@types/d3-array": "^3.0.2",
Expand All @@ -69,7 +69,7 @@
"@deck.gl/extensions": "^9.0.0-beta",
"@deck.gl/geo-layers": "^9.0.0-beta",
"@deck.gl/layers": "^9.0.0-beta",
"@loaders.gl/core": "^4.1.0",
"@loaders.gl/core": "^4.2.0",
"@luma.gl/core": "^9.0.0"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
Expand Down
5 changes: 4 additions & 1 deletion modules/carto/src/api/common.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import {VERSION} from '@deck.gl/core';

export const DEFAULT_API_BASE_URL = 'https://gcp-us-east1.api.carto.com';
export const DEFAULT_CLIENT = 'deck-gl-carto';
export const V3_MINOR_VERSION = '3.4';
export const MAX_GET_LENGTH = 8192;

export const DEFAULT_PARAMETERS = {
v: V3_MINOR_VERSION
v: V3_MINOR_VERSION,
deckglVersion: VERSION
};

export const DEFAULT_HEADERS = {
Expand Down
4 changes: 2 additions & 2 deletions modules/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"prepublishOnly": "npm run build-debugger && npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@loaders.gl/core": "^4.1.4",
"@loaders.gl/images": "^4.1.4",
"@loaders.gl/core": "^4.2.0",
"@loaders.gl/images": "^4.2.0",
"@luma.gl/constants": "^9.0.9",
"@luma.gl/core": "^9.0.9",
"@luma.gl/engine": "^9.0.9",
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/lib/deck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export default class Deck<ViewsT extends ViewOrViews = null> {
this.widgetManager?.finalize();
this.widgetManager = null;

if (!this.props.canvas && !this.props.device && this.canvas) {
if (!this.props.canvas && !this.props.device && !this.props.gl && this.canvas) {
// remove internally created canvas
this.canvas.parentElement?.removeChild(this.canvas);
this.canvas = null;
Expand Down
2 changes: 2 additions & 0 deletions modules/core/src/utils/json-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ function isJSON(text: string): boolean {

// A light weight version instead of @loaders.gl/json (stream processing etc.)
export default {
dataType: null as any,
batchType: null as never,
id: 'JSON',
name: 'JSON',
module: '',
Expand Down
Loading

0 comments on commit a0385f7

Please sign in to comment.