Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve examples #339

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/examples/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class App extends React.Component {
render() {
return (
<Router>
<div style={{ height: '100%' }}>
<div
style={{ height: '100%', display: 'flex', flexDirection: 'column' }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of inline-style, we need to use dedicated fils of.scss to reduce conflict later, what's your opinion on this @IgnacioFDM

>
<header className="app-header">
<nav>
<ul>
Expand Down
5 changes: 5 additions & 0 deletions src/examples/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ html, body {
font-family: sans-serif;
font-size: 12px;
margin: 0px;
height: 100%;
}

button {
margin-right: 10px;
}

#content {
height: 100%;
}

#graph {
height: 100%;
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/examples/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ class Graph extends React.Component<IGraphProps, IGraphState> {
</select>
</div>
</div>
<div id="graph" style={{ height: 'calc(100% - 87px)' }}>
<div id="graph">
<GraphView
ref={el => (this.GraphView = el)}
allowMultiselect={allowMultiselect}
Expand Down
9 changes: 2 additions & 7 deletions src/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,14 @@
See the License for the specific language governing permissions and
limitations under the License. -->

<!DOCTYPE html>
<html>
<head>
<title>react-digraph examples</title>
<link rel="stylesheet" href="app.css">
</head>

<body>
<div id="content"></div>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/[email protected]/umd/react-router-dom.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script crossorigin src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.13.0/d3.js"></script>
<script src="./example.js"></script>
</body>

</html>
</html>