Skip to content

Commit fc80a3c

Browse files
authored
Add horizon graph layer website example (#270)
1 parent fecc082 commit fc80a3c

File tree

5 files changed

+45
-1
lines changed

5 files changed

+45
-1
lines changed

examples/graph-layers/graph-viewer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "module",
77
"scripts": {
88
"start": "vite --open",
9-
"start-local": "vite --config ../vite.config.local.mjs"
9+
"start-local": "vite --config ../../vite.config.local.mjs"
1010
},
1111
"dependencies": {
1212
"@deck.gl-community/graph-layers": "^9.1.0-beta.5",

website/docusaurus.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const config = {
5353
'@deck.gl-community/bing-maps': resolve('../modules/bing-maps/src'),
5454
'@deck.gl-community/leaflet': resolve('../modules/leaflet/src'),
5555
'@deck.gl-community/graph-layers': resolve('../modules/graph-layers/src'),
56+
'@deck.gl-community/infovis-layers': resolve('../modules/infovis-layers/src'),
5657
'@deck.gl-community/react': resolve('../modules/react/src'),
5758
'@deck.gl-community/layers': resolve('../modules/layers/src'),
5859
'@deck.gl-community/arrow-layers': resolve('../modules/arrow-layers/src'),

website/src/examples-sidebar.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ const sidebars = {
2828
"graph-layers/graph-viewer"
2929
]
3030
},
31+
{
32+
type: 'category',
33+
label: '@deck.gl-community/infovis-layers',
34+
items: [
35+
"infovis-layers/horizon-graph-layer"
36+
]
37+
},
3138
{
3239
type: 'category',
3340
label: '@deck.gl-community/editable-layers',
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Horizon Graph Layer Demo
2+
3+
import Demo from './horizon-graph-layer';
4+
5+
<Demo />
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React, {Component} from 'react';
2+
import BrowserOnly from '@docusaurus/BrowserOnly';
3+
4+
import {GITHUB_TREE} from '../../constants/defaults';
5+
6+
import {makeExample} from '../../components';
7+
8+
class HorizonDemo extends Component {
9+
static title = 'Horizon Graph Layer Demo';
10+
11+
static code = `${GITHUB_TREE}/examples/infovis-layers/horizon-graph-layer`;
12+
13+
static renderInfo(meta) {
14+
return <></>;
15+
}
16+
17+
render() {
18+
const {...otherProps} = this.props;
19+
20+
return (
21+
<BrowserOnly>
22+
{() => {
23+
const App = require('../../../../examples/infovis-layers/horizon-graph-layer/app').default;
24+
return <App {...otherProps} />;
25+
}}
26+
</BrowserOnly>
27+
);
28+
}
29+
}
30+
31+
export default makeExample(HorizonDemo);

0 commit comments

Comments
 (0)