Commit 11ca7a3d by zhaochengxiang

地图样式调整

parent 247742eb
...@@ -307,6 +307,7 @@ class Org extends React.Component { ...@@ -307,6 +307,7 @@ class Org extends React.Component {
parentData.children = parentData.children.filter(item => item.dbType!=='More'); parentData.children = parentData.children.filter(item => item.dbType!=='More');
parentData.children = [...parentData.children, ...childData]; parentData.children = [...parentData.children, ...childData];
graph.changeData(); graph.changeData();
// graph.fitView();
graph.updateItem(graph.findById(parentNodeId), { graph.updateItem(graph.findById(parentNodeId), {
collapsed: false, collapsed: false,
......
...@@ -294,7 +294,7 @@ G6.registerNode( ...@@ -294,7 +294,7 @@ G6.registerNode(
textBaseLine: 'alphabetic', textBaseLine: 'alphabetic',
cursor: 'pointer', cursor: 'pointer',
fontSize, fontSize,
fill: '#fff', fill: '#000',
opacity: 0.85, opacity: 0.85,
fontWeight: 400, fontWeight: 400,
// stroke: global.edge.labelCfg.style.stroke, // stroke: global.edge.labelCfg.style.stroke,
......
...@@ -41,7 +41,7 @@ class SquareItem extends React.Component { ...@@ -41,7 +41,7 @@ class SquareItem extends React.Component {
bordered={false} bordered={false}
className="overflow-hidden" className="overflow-hidden"
cover={ cover={
<div className={'flex px-4 py-3 bg-gradient-to-br leading-6 font-semibold text-white ' + colors[index % colors.length]} style={{ justifyContent: 'center', alignItems: 'center' }}> <div className='flex px-4 py-3 leading-6 font-semibold text-white ' style={{ justifyContent: 'center', alignItems: 'center', backgroundColor: '#2593fc' }}>
<span className='flex-auto self-center textOverflow' title={title}>{title}</span> <span className='flex-auto self-center textOverflow' title={title}>{title}</span>
<cite className='flex opacity-75 hover:opacity-100 transition-opacity duration-200'> <cite className='flex opacity-75 hover:opacity-100 transition-opacity duration-200'>
{ {
......
...@@ -127,6 +127,7 @@ class Tree extends React.Component { ...@@ -127,6 +127,7 @@ class Tree extends React.Component {
graph = new G6.TreeGraph({ graph = new G6.TreeGraph({
container: `container${type||''}`, container: `container${type||''}`,
animate: false,
width, width,
height, height,
maxZoom: 1, maxZoom: 1,
...@@ -261,10 +262,11 @@ class Tree extends React.Component { ...@@ -261,10 +262,11 @@ class Tree extends React.Component {
if (!parentData.children) { if (!parentData.children) {
parentData.children = []; parentData.children = [];
} }
parentData.children = parentData.children.filter(item => item.dbType!=='More'); parentData.children = parentData.children.filter(item => item.dbType!=='More');
parentData.children = [...parentData.children, ...childData]; parentData.children = [...parentData.children, ...childData];
graph.changeData(); graph.changeData();
// graph.fitView();
graph.updateItem(graph.findById(parentNodeId), { graph.updateItem(graph.findById(parentNodeId), {
collapsed: false, collapsed: false,
......
...@@ -258,7 +258,9 @@ class MapContent extends React.Component { ...@@ -258,7 +258,9 @@ class MapContent extends React.Component {
); );
} else { } else {
return ( return (
<div className='position-relative' style={{ height: '100%', overflow: 'hidden', backgroundImage: 'linear-gradient(to bottom left,#2e3b4e,#0d0d13 52%,#0d0d13)' }}> <div className='position-relative' style={{ height: '100%', overflow: 'hidden',
//backgroundImage: 'linear-gradient(to bottom left,#2e3b4e,#0d0d13 52%,#0d0d13)'
}}>
{ {
type === 'org' && <Org type === 'org' && <Org
data={orgModelData} data={orgModelData}
...@@ -311,9 +313,9 @@ class MapContent extends React.Component { ...@@ -311,9 +313,9 @@ class MapContent extends React.Component {
</div> </div>
<div id="left-control-container"></div> {/* <div id="left-control-container"></div>
<div id="right-control-container"></div> <div id="right-control-container"></div>
<div id="bottom-bg-container"></div> <div id="bottom-bg-container"></div> */}
</div> </div>
) )
} }
......
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