drag right

This commit is contained in:
zhandouxiaojiji committed 2020-10-21 17:06:15 +08:00
1 parent 4fd1992f1f
commit b4e08f7108
4 files changed
+159 -57

No files matched your search

+15 -2
View File
@@ -101,7 +101,7 @@ export default class Main extends Component {
draggable: true,
});
// title text
// id text
group.addShape('text', {
attrs: {
textBaseline: 'top',
@@ -111,7 +111,20 @@ export default class Main extends Component {
text: cfg.id,
fill: 'black',
},
name: 'title',
name: 'id-text',
});
// name text
group.addShape('text', {
attrs: {
textBaseline: 'top',
x: -w / 2 + 20,
y: -h / 2 + 2,
lineHeight: 20,
text: cfg.name,
fill: 'black',
},
name: 'name-text',
});
group.addShape('rect', {