| | |
| | | G6.registerNode( |
| | | 'dice-mind-map-root', { |
| | | jsx: (cfg) => { |
| | | const width = Util.getTextSize(cfg.label, 16)[0] + 24; |
| | | const width = Util.getTextSize(cfg.label, 14)[0] + 12; |
| | | const stroke = cfg.style.stroke || '#096dd9'; |
| | | |
| | | return ` |
| | | <group> |
| | | <rect draggable="true" style={{width: ${width}, height: 42, stroke: ${stroke}, radius: 4}} keyshape> |
| | | <text style={{ fontSize: 16, marginLeft: 12, marginTop: 12 }}>${cfg.label}</text> |
| | | <rect draggable="true" style={{width: ${width}, height: 30, stroke: ${stroke}, radius: 4}} keyshape> |
| | | <text style={{ fontSize: 14, marginLeft: 6, marginTop: 6 }}>${cfg.label}</text> |
| | | </rect> |
| | | </group> |
| | | `; |
| | |
| | | |
| | | const tree = new G6.TreeGraph({ |
| | | container: 'mountNode', |
| | | width: 750, |
| | | height: 500, |
| | | width: 600, |
| | | height: 350, |
| | | fitView: true, |
| | | fitViewPadding: [10, 20], |
| | | layout: { |
| | |
| | | title="" |
| | | wrapClassName="view-nodes-modal" |
| | | visible={visible} |
| | | width={850} |
| | | width={700} |
| | | closable={false} |
| | | maskClosable={false} |
| | | footer={[]} |