@deck.gl/jupyter-widget 9.1.1 → 9.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -2
- package/dist/index.js.map +3 -3
- package/package.json +10 -10
- package/src/playground/create-deck.js +23 -7
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@deck.gl/jupyter-widget",
|
|
3
3
|
"description": "Jupyter widget for rendering deck.gl in a Jupyter notebook",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "9.1.
|
|
5
|
+
"version": "9.1.3",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"jupyter",
|
|
8
8
|
"jupyterlab",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"prepublishOnly": "npm run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@deck.gl/aggregation-layers": "9.1.
|
|
33
|
-
"@deck.gl/core": "9.1.
|
|
34
|
-
"@deck.gl/geo-layers": "9.1.
|
|
35
|
-
"@deck.gl/google-maps": "9.1.
|
|
36
|
-
"@deck.gl/json": "9.1.
|
|
37
|
-
"@deck.gl/layers": "9.1.
|
|
38
|
-
"@deck.gl/mesh-layers": "9.1.
|
|
39
|
-
"@deck.gl/widgets": "9.1.
|
|
32
|
+
"@deck.gl/aggregation-layers": "9.1.3",
|
|
33
|
+
"@deck.gl/core": "9.1.3",
|
|
34
|
+
"@deck.gl/geo-layers": "9.1.3",
|
|
35
|
+
"@deck.gl/google-maps": "9.1.3",
|
|
36
|
+
"@deck.gl/json": "9.1.3",
|
|
37
|
+
"@deck.gl/layers": "9.1.3",
|
|
38
|
+
"@deck.gl/mesh-layers": "9.1.3",
|
|
39
|
+
"@deck.gl/widgets": "9.1.3",
|
|
40
40
|
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4",
|
|
41
41
|
"@loaders.gl/3d-tiles": "^4.2.0",
|
|
42
42
|
"@loaders.gl/core": "^4.2.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "bcfeb6dbc37a3fa080837411be499cfb98681e98"
|
|
60
60
|
}
|
|
@@ -127,7 +127,8 @@ function createStandaloneFromProvider({
|
|
|
127
127
|
googleMapsKey,
|
|
128
128
|
handleEvent,
|
|
129
129
|
getTooltip,
|
|
130
|
-
container
|
|
130
|
+
container,
|
|
131
|
+
onError
|
|
131
132
|
}) {
|
|
132
133
|
// Common deck.gl props for all basemaos
|
|
133
134
|
const handlers = handleEvent
|
|
@@ -145,7 +146,8 @@ function createStandaloneFromProvider({
|
|
|
145
146
|
onDrag: info => handleEvent('deck-drag-event', info),
|
|
146
147
|
onDragEnd: info => handleEvent('deck-drag-end-event', info)
|
|
147
148
|
}
|
|
148
|
-
:
|
|
149
|
+
: {};
|
|
150
|
+
handlers.onError = onError;
|
|
149
151
|
|
|
150
152
|
const sharedProps = {
|
|
151
153
|
...handlers,
|
|
@@ -196,9 +198,24 @@ function createDeck({
|
|
|
196
198
|
tooltip,
|
|
197
199
|
handleEvent,
|
|
198
200
|
customLibraries,
|
|
199
|
-
configuration
|
|
201
|
+
configuration,
|
|
202
|
+
showError
|
|
200
203
|
}) {
|
|
201
204
|
let deckgl;
|
|
205
|
+
const onError = e => {
|
|
206
|
+
if (showError) {
|
|
207
|
+
const uiErrorText = window.document.createElement('pre');
|
|
208
|
+
uiErrorText.textContent = `Error: ${e.message}\nSource: ${e.source}\nLine: ${e.lineno}:${e.colno}\n${e.error ? e.error.stack : ''}`;
|
|
209
|
+
uiErrorText.className = 'error_text';
|
|
210
|
+
|
|
211
|
+
container.appendChild(uiErrorText);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// This will fail in node tests
|
|
215
|
+
// eslint-disable-next-line
|
|
216
|
+
console.error(e);
|
|
217
|
+
};
|
|
218
|
+
|
|
202
219
|
try {
|
|
203
220
|
if (configuration) {
|
|
204
221
|
jsonConverter.mergeConfiguration(configuration);
|
|
@@ -223,7 +240,8 @@ function createDeck({
|
|
|
223
240
|
googleMapsKey,
|
|
224
241
|
handleEvent,
|
|
225
242
|
getTooltip,
|
|
226
|
-
container
|
|
243
|
+
container,
|
|
244
|
+
onError
|
|
227
245
|
});
|
|
228
246
|
|
|
229
247
|
const onComplete = () => {
|
|
@@ -241,9 +259,7 @@ function createDeck({
|
|
|
241
259
|
|
|
242
260
|
addCustomLibraries(customLibraries, onComplete);
|
|
243
261
|
} catch (err) {
|
|
244
|
-
|
|
245
|
-
// eslint-disable-next-line
|
|
246
|
-
console.error(err);
|
|
262
|
+
onError(err);
|
|
247
263
|
}
|
|
248
264
|
return deckgl;
|
|
249
265
|
}
|