Closed trombonehero closed 7 years ago
I've differentiated based on the external field, which I believe corresponds to the first checkbox. See the machine-view branch.
Hi @alsz,
I've pulled in d730a154e783d8a2d34068d9f252b5051622e61c but still see the following:
Do the nodes look different for you?
Sorry, the previous screen shot was from the worksheet rather than the machines view. However, I still see the same thing in the machines view:
Aha:
--- a/playground/templates/machine-view.html [1/6683]
+++ b/playground/templates/machine-view.html
@@ -35,18 +35,20 @@ load_graph_style([ view ]);
$.getJSON('machines', function(result) {
for (let machine of result.nodes) {
+ let classes = machine.type;
+ if (machine.external) {
+ classes += ' machine-external';
+ } else {
+ classes += ' machine-internal';
+ }
+
let node = {
- classes: machine.type,
+ classes: classes,
data: machine,
};
node.data.label = node_metadata(machine).label;
graph_node = view.add(node);
- if (machine.external) {
- graph_node.addClass('machine-external')
- } else {
- graph_node.addClass('machine-internal')
- }
}
for (let e of result.edges) {
Weird that retroactive class modification worked for you but not me. This way seems to work for me too, however, so I'll commit this.
Resolved by d730a154e783d8a2d34068d9f252b5051622e61c, 091f550a69a60ff6950c6b57d196299417f0090e and b71aea627491bb08791d4d8aa8deb667bacb0efd.
It would be nice to more clearly differentiate in the high-level machine view between: