-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
3,356 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,48 @@ | ||
import * as React from "react"; | ||
import { Layout, Menu } from "antd"; | ||
import { Switch, Route, Link, useLocation, useHistory } from "react-router-dom"; | ||
import Editor from "./editor"; | ||
import "./styles.css"; | ||
import Bubble from "./bubble"; | ||
|
||
import "./styles.scss"; | ||
const { useState, useEffect } = React; | ||
const { Header, Content } = Layout; | ||
|
||
export default function App() { | ||
const [menuKey, setMenuKey] = useState("/"); | ||
const location = useLocation(); | ||
useEffect(() => { | ||
const pathname = location.pathname; | ||
setMenuKey(pathname); | ||
}, [location]); | ||
|
||
console.log('menuKey',menuKey) | ||
return ( | ||
<div className="App"> | ||
<Editor /> | ||
</div> | ||
<Layout className="layout"> | ||
<Header> | ||
<div className="logo" /> | ||
<Menu | ||
theme="dark" | ||
mode="horizontal" | ||
selectedKeys={[menuKey]} | ||
style={{ lineHeight: "64px" }} | ||
> | ||
<Menu.Item key="/"> | ||
<Link to="/">图编排</Link> | ||
</Menu.Item> | ||
<Menu.Item key="/bubble"> | ||
<Link to="/bubble">气泡图</Link> | ||
</Menu.Item> | ||
</Menu> | ||
</Header> | ||
<Content> | ||
<div className="site-layout-content"> | ||
<Switch> | ||
<Route exact path="/" component={Editor} /> | ||
<Route exact path="/bubble" component={Bubble} /> | ||
</Switch> | ||
</div> | ||
</Content> | ||
</Layout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
.bubble-wrapper { | ||
margin:0px auto; | ||
width:850px; | ||
height:600px; | ||
} | ||
.bubble-container { | ||
width: 100%; | ||
height: 100%; | ||
position: relative; | ||
|
||
.icon-back { | ||
font-size: 20px; | ||
position: absolute; | ||
top: 8px; | ||
left: 420px; | ||
cursor: pointer; | ||
color: #6ca0f5; | ||
z-index: 99; | ||
} | ||
|
||
.scene-center-title { | ||
position: absolute; | ||
font-size: 20px; | ||
color: #fff; | ||
top: 5px; | ||
left: 274px; | ||
} | ||
|
||
.scene-center-legend { | ||
position: absolute; | ||
left: 220px; | ||
bottom: 16px; | ||
|
||
.data-storage { | ||
display: inline-block; | ||
line-height: 26px; | ||
margin: 0 8px; | ||
|
||
> div { | ||
display: inline-block; | ||
border: 1px solid #6ca0f5; | ||
margin-left: 8px; | ||
margin-right: 4px; | ||
vertical-align: middle; | ||
} | ||
|
||
.small { | ||
width: 8px; | ||
height: 8px; | ||
border-radius: 8px; | ||
} | ||
|
||
.middle { | ||
width: 17px; | ||
height: 17px; | ||
border-radius: 17px; | ||
} | ||
|
||
.big { | ||
width: 26px; | ||
height: 26px; | ||
border-radius: 26px; | ||
} | ||
} | ||
|
||
.data-flow { | ||
display: inline-block; | ||
line-height: 26px; | ||
margin: 0 8px; | ||
|
||
.flow-arrow { | ||
display: inline-block; | ||
vertical-align: middle; | ||
width: 120px; | ||
height: 26px; | ||
} | ||
} | ||
} | ||
|
||
.scene-center-legend-selected { | ||
left: 135px; | ||
} | ||
} | ||
|
||
.bubble { | ||
.bubble-nodes { | ||
cursor: pointer; | ||
} | ||
|
||
.bubble-text { | ||
cursor: pointer; | ||
} | ||
} | ||
|
Oops, something went wrong.