Revize a70962cb
Přidáno uživatelem Tomáš Šimandl před více než 6 roky(ů)
sources/src/main/webapp/js/graphLoader.js | ||
---|---|---|
22 | 22 |
app.attributeTypeList = data.attributeTypes; |
23 | 23 |
app.possibleEnumValues = data.possibleEnumValues; |
24 | 24 |
|
25 |
app.archetype.vertex.forEach(function (vertexArchetype) { |
|
26 |
|
|
27 |
var icon = ""; |
|
28 |
if(app.utils.isDefined(vertexArchetype.icon) && vertexArchetype.icon !== "") { |
|
29 |
icon = vertexArchetype.icon; |
|
30 |
} else { |
|
31 |
// TODO: solve duplicate icons when name starts with the same letter |
|
32 |
icon = "<text fill='black' x='0' y='7'>" + vertexArchetype.name.substring(0,1) + "</text>" |
|
33 |
} |
|
34 |
app.viewportComponent.addSvgDefinition('vertexArchetypeIcon-' + vertexArchetype.name, icon); |
|
35 |
}); |
|
36 |
|
|
25 | 37 |
app.archetype.vertex.filter(function(vertexArchetype) { |
26 | 38 |
return app.utils.isDefined(vertexArchetype.icon); |
27 | 39 |
}).forEach(function(vertexArchetype) { |
Také k dispozici: Unified diff
Added generated icon for every archetype