Skip to content

Commit

Permalink
[feature] deepflow topo panel, remove text shadow of simple topo title
Browse files Browse the repository at this point in the history
**Phenomenon and reproduction steps**

none

**Root cause and solution**

none

**Impactions**

none

**Test method**

none

**Affected branch(es)**

- main

**Checklist**

- [ ] Dependencies update required
- [ ] Common bug (similar problem in other repo)
  • Loading branch information
twou12031 authored and travilyu committed Nov 10, 2022
1 parent 20d98b7 commit b5744cf
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions deepflow-topo-panel/src/SimplePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,10 @@ export const SimplePanel: React.FC<Props> = ({ options, data, width, height }) =
const renderOptions: Record<any, any> = {
getNodeV: (node: Node<NodeItem>) => 0,
getNodeColor: (node: Node<NodeItem>) => nodeAndLinkColor,
getNodeIcon: (node: Node<NodeItem>) => node.data.node_type,
getNodeTitle: (node: Node<NodeItem>) => node.data.displayName,
getLinkV: (link: Link<LinkItem>) => link.data.metricValue,
getLinkColor: (link: Link<LinkItem>) => nodeAndLinkColor,
titleColor: titleColor,
nodeSize: [40, 40],
watchZoomEvent: (event: any) => handleZoomEvent(event),
...(topoType !== 'simpleTopo'
? {
Expand Down Expand Up @@ -450,7 +448,19 @@ export const SimplePanel: React.FC<Props> = ({ options, data, width, height }) =
},
getGroupNameColor: () => nodeAndLinkColor
}
: {})
: {
getNodeIcon: (node: Node<NodeItem>) => node.data.node_type,
setNodeStyle: (node: Node<NodeItem>) => {
try {
node.refs.textEle.attr('stroke-width', '')
node.refs.textEle.attr('stroke', '')
node.refs.textEle.attr('paint-order', '')
} catch (error) {
console.log(error)
}
},
nodeSize: [40, 40]
})
}
const handler = renderFunction(
chartContainer,
Expand Down

0 comments on commit b5744cf

Please sign in to comment.