From 42bda752862aa4e1e01858050ce2dff3a5e86c80 Mon Sep 17 00:00:00 2001 From: zhandouxiaojiji Date: Mon, 26 Oct 2020 11:24:35 +0800 Subject: [PATCH] change node style --- render-process/index.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/render-process/index.tsx b/render-process/index.tsx index 6ad7b6e..d494561 100644 --- a/render-process/index.tsx +++ b/render-process/index.tsx @@ -67,9 +67,8 @@ export default class Main extends Component { }, }, hover: { - 'name-text': { - stroke: 'white', - } + stroke: 'white', + lineWidth: 3, }, dragSrc: { fill: 'gray', @@ -134,12 +133,15 @@ export default class Main extends Component { group.addShape('text', { attrs: { textBaseline: 'top', - x: x0 + 13, - y: y0 + 4, + x: x0 - 3, + y: -8, + fontSize: 20, lineHeight: 20, text: cfg.id, textAlign: 'right', - fill: 'black', + fill: 'white', + stroke: 'black', + lineWidth: 2, }, name: 'id-text', }); @@ -149,7 +151,7 @@ export default class Main extends Component { console.log(cfg.type, classify); group.addShape('image', { attrs: { - x: x0 + 15, + x: x0 + 3, y: y0 + 2, height: 14, width: 14, @@ -162,7 +164,7 @@ export default class Main extends Component { group.addShape('text', { attrs: { textBaseline: 'top', - x: x0 + 35, + x: x0 + 18, y: y0 + 4, lineHeight: 20, text: cfg.name,