Skip to content

Commit

Permalink
feat(graphin):add iconfont
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Nov 19, 2019
1 parent bd5f661 commit 259e2b2
Show file tree
Hide file tree
Showing 25 changed files with 1,958 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/graphin-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"url": "https://github.com/antvis/graphin"
},
"devDependencies": {
"@antv/gatsby-theme-antv": "^0.9.60",
"@antv/gatsby-theme-antv": "^0.9.69",
"gatsby": "^2.17.7",
"gh-pages": "^2.1.1"
},
Expand Down
15 changes: 15 additions & 0 deletions packages/graphin-studio/src/Extend/RectNodeShape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ const renderRectNode = (node: Node) => {
fill: style.iconFill,
},
},
// // iconFont
// {
// shape: 'text',
// attrs: {
// id: 'node-icon',
// x: style.containerWidth / 2,
// y: style.containerWidth / 2,
// fontSize: style.iconSize,
// fill: style.iconFill,
// text: '',
// fontFamily: 'iconfont', // 瀵瑰簲css閲岄潰鐨刦ont-family: "iconfont";
// textAlign: 'center',
// textBaseline: 'middle',
// },
// },
{
shape: 'text',
attrs: {
Expand Down
2 changes: 2 additions & 0 deletions packages/graphin-studio/src/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import useGraphEvents from './Events/useGraphEvents';
/** components */
import NodeEdgeCount from './Core/NodeEdgeCount';

import './fonts/iconfont.css';

const Graphene = (props: GraphProps) => {
const graphRef = useRef(null) as any; // eslint-disable-line
const { dispatch, data, layout, toolbar, store } = props;
Expand Down
Loading

0 comments on commit 259e2b2

Please sign in to comment.