Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
81ecca6b
Commit
81ecca6b
authored
Apr 10, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
热力图自适应
parent
13b81426
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
RelationContainer.jsx
src/view/Manage/AssetBrowse/Component/RelationContainer.jsx
+1
-1
Thermodynamic.jsx
src/view/Manage/AssetBrowse/Component/Thermodynamic.jsx
+15
-4
No files found.
src/view/Manage/AssetBrowse/Component/RelationContainer.jsx
View file @
81ecca6b
...
@@ -267,7 +267,7 @@ const RelationContainer = (props) => {
...
@@ -267,7 +267,7 @@ const RelationContainer = (props) => {
(
type
===
'relation'
)
&&
<
Relation
data=
{
relationData
}
expandId=
{
nodeParams
?.
expandId
}
resize=
{
resize
}
onCenterClick=
{
onCenterClick
}
onExpandClick=
{
onExpandClick
}
/>
(
type
===
'relation'
)
&&
<
Relation
data=
{
relationData
}
expandId=
{
nodeParams
?.
expandId
}
resize=
{
resize
}
onCenterClick=
{
onCenterClick
}
onExpandClick=
{
onExpandClick
}
/>
}
}
{
{
(
type
===
'thermodynamic'
)
&&
<
Thermodynamic
data=
{
thermodynamicData
}
onClick=
{
onThermodynamicClick
}
/>
(
type
===
'thermodynamic'
)
&&
<
Thermodynamic
data=
{
thermodynamicData
}
resize=
{
resize
}
onClick=
{
onThermodynamicClick
}
/>
}
}
<
Radio
.
Group
value=
{
type
}
onChange=
{
onTypeChange
}
buttonStyle=
"solid"
style=
{
{
position
:
'absolute'
,
right
:
15
,
top
:
20
}
}
>
<
Radio
.
Group
value=
{
type
}
onChange=
{
onTypeChange
}
buttonStyle=
"solid"
style=
{
{
position
:
'absolute'
,
right
:
15
,
top
:
20
}
}
>
{
{
...
...
src/view/Manage/AssetBrowse/Component/Thermodynamic.jsx
View file @
81ecca6b
...
@@ -7,19 +7,22 @@ class Thermodynamic extends React.Component {
...
@@ -7,19 +7,22 @@ class Thermodynamic extends React.Component {
componentDidMount
()
{
componentDidMount
()
{
const
{
data
,
onClick
}
=
this
.
props
;
const
{
data
,
onClick
}
=
this
.
props
;
if
(
data
)
{
if
(
data
)
{
init
(
this
)(
this
.
elem
,
data
,
onClick
);
this
.
graph
=
init
(
this
)(
this
.
elem
,
data
,
onClick
);
}
}
}
}
componentDidUpdate
(
prevProps
,
prevState
)
{
componentDidUpdate
(
prevProps
,
prevState
)
{
const
{
data
,
onClick
}
=
this
.
props
;
const
{
data
,
onClick
,
resize
}
=
this
.
props
;
if
(
data
)
{
if
(
data
!==
prevProps
.
data
)
{
init
(
this
)(
this
.
elem
,
data
,
onClick
);
this
.
graph
=
init
(
this
)(
this
.
elem
,
data
,
onClick
);
}
else
if
(
resize
!==
prevProps
.
resize
)
{
this
.
graph
?.
resize
();
}
}
}
}
elem
=
undefined
;
elem
=
undefined
;
graph
=
undefined
;
render
()
{
render
()
{
return
(
return
(
...
@@ -126,4 +129,11 @@ const init = (ctx) => function (container, data, onClick) {
...
@@ -126,4 +129,11 @@ const init = (ctx) => function (container, data, onClick) {
onClick && onClick(data.nodeId);
onClick && onClick(data.nodeId);
});
});
if (typeof window !== 'undefined') {
window.onresize = () => {
myChart?.resize();
};
}
return myChart;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment