Commit 12bc56c5 by zhaochengxiang

Merge branch 'dev-2106' into 'master'

Dev 2106

See merge request !1
parents d8648343 5ce9dced
......@@ -196,6 +196,8 @@ G6.registerNode(
visible: false,
});
}
width1 = r * 2.5
width2 = r * 4
if (depthCount[cfg.depth] > 10) {
group.addShape('image', {
......
......@@ -47,8 +47,8 @@ class Map extends React.Component {
callback: data => {
this.setState({
loadingTopics: false,
topics: data||[],
tabKey: (data||[]).length>0?data[0].id:'',
topics: data || [],
tabKey: (data || []).length > 0 ? data[0].id : '',
});
},
error: () => {
......@@ -68,12 +68,31 @@ class Map extends React.Component {
render() {
const { type, tabKey, topics, loadingTopics } = this.state;
const switchMode = <div className=''>
<Radio.Group
value={type}
onChange={this.onTypeChange} size="small"
>
{
graphModes && graphModes.map((mode, index) => {
return (
<Tooltip key={index} title={mode.title || ''} >
<Radio.Button value={mode.key}>{(mode.title || '').substring(0, 1)}</Radio.Button>
</Tooltip>
);
})
}
</Radio.Group>
</div>
return (
<div className='asset-map' style={{ backgroundColor: '#fff' }}>
{
loadingTopics ? <Spin /> : <>
{
topics && topics.length>0 && <Tabs
topics && topics.length > 0 && <Tabs
activeKey={tabKey}
size='large'
centered
......@@ -82,27 +101,10 @@ class Map extends React.Component {
{
topics && topics.map((topic) => {
return (
<TabPane tab={topic.name||''} key={topic.id||''}>
<div className='d-flex px-3' style={{ height: 53, alignItems: 'center' }}>
<Radio.Group
value={type}
onChange={this.onTypeChange}
style={{ marginLeft: 'auto' }}
>
{
graphModes && graphModes.map((mode, index) => {
return (
<Tooltip key={index} title={mode.title||''} >
<Radio.Button value={mode.key}>{(mode.title||'').substring(0, 1)}</Radio.Button>
</Tooltip>
);
})
}
</Radio.Group>
</div>
<TabPane tab={topic.name || ''} key={topic.id || ''}>
{
tabKey===topic.id && <div className='map-container' style={{ padding: '0 10px' }}>
<MapContent type={type} topic={topic} {...this.props} />
tabKey === topic.id && <div className='map-container' >
<MapContent type={type} topic={topic} switchMode={switchMode} {...this.props} />
</div>
}
</TabPane>
......
......@@ -7,7 +7,7 @@
}
.map-container {
height: calc(100vh - 64px - 30px - 57px - 53px) !important;
height: calc(100vh - 64px - 30px - 57px/* - 53px */) !important;
overflow: auto !important;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment