在 UML class diagram-jointjs 中检索属性
Retrieve the attributes in a UML class diagram-jointjs
我想使用 jointJS 在 UML class 图中检索属性和 class 名称。请在这方面提供帮助。
也许你可以使用:
this.attr('.uml-class-name-text/text')
获取 class 名称并使用
this.attr('.uml-class-attrs-text/text')
检索属性。
"this"为您选择的对象,见下文
var selected;
paper.on('cell:pointerdown', function(cellView) {
selected = cellView.model;
});
uml图的所有属性都在"attribute"对象中,如果你已经创建了图,那么你可以通过以下方式访问它:
graph.getCell("cell_id").attributes;
cell_id 出现在图表的 ID 属性 中。
希望这对您有所帮助!
我想使用 jointJS 在 UML class 图中检索属性和 class 名称。请在这方面提供帮助。
也许你可以使用:
this.attr('.uml-class-name-text/text')
获取 class 名称并使用
this.attr('.uml-class-attrs-text/text')
检索属性。
"this"为您选择的对象,见下文
var selected;
paper.on('cell:pointerdown', function(cellView) {
selected = cellView.model;
});
uml图的所有属性都在"attribute"对象中,如果你已经创建了图,那么你可以通过以下方式访问它:
graph.getCell("cell_id").attributes;
cell_id 出现在图表的 ID 属性 中。 希望这对您有所帮助!