Skip to content

Commit

Permalink
[Fix Bug] Cannot compute score correctly when the source_type is equa…
Browse files Browse the repository at this point in the history
…l with the target_type.
  • Loading branch information
yjcyxky committed Mar 15, 2024
1 parent f2e4d9a commit e85eaf4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/model/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1171,13 +1171,14 @@ impl Graph {
));
}

let reverse = if source_type == r_target_type {
// We might get a same type relation, like "STRING::BINDING::Gene:Gene", so we need to check if the source type is the same as the target type and the source type is the same as the relation source type
let reverse = if source_type == r_target_type && source_type != r_source_type {
true
} else {
false
};

let target_type = if source_type == r_target_type {
let target_type = if source_type == r_target_type && source_type != r_source_type {
r_source_type
} else {
r_target_type
Expand Down
5 changes: 3 additions & 2 deletions studio/src/components/Footer/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
align-items: center;

.ant-layout-footer {
width: 100%;
z-index: 10;

.ant-pro-global-footer {
margin: 0px 0px 0px;
margin: 0 0 0;
}
}

span {
margin: 5px 0px;
margin: 5px 0;
}
}
3 changes: 3 additions & 0 deletions studio/src/pages/KnowledgeTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ const KnowledgeTable: React.FC = (props) => {
dataIndex: 'score',
align: 'center',
key: 'score',
render: (text) => {
return <span>{text.toFixed(3)}</span>;
},
sorter: (a, b) => a.score - b.score,
}
];
Expand Down

0 comments on commit e85eaf4

Please sign in to comment.