Skip to content
Snippets Groups Projects
Commit b8fd6343 authored by Sergey Linev's avatar Sergey Linev
Browse files

[geom viewer] improve highlight of elements

When not full stack match is achieved, best shown with grey color
parent 4fbb8074
No related branches found
No related tags found
No related merge requests found
......@@ -223,14 +223,18 @@ sap.ui.define(['sap/ui/core/mvc/Controller',
/** Callback from geo painter when mesh object is highlighted. Use for update of TreeTable */
HighlightMesh: function(active_mesh, color, geo_object, geo_index, geo_stack) {
var rows = this.getView().byId("treeTable").getRows();
var rows = this.getView().byId("treeTable").getRows(), best_cmp = 0, best_indx = 0;
for (var i=0;i<rows.length;++i) {
var col = "";
if (geo_stack && JSROOT.GEO.IsSameStack(this.getRowStack(rows[i]), geo_stack))
col = "yellow";
rows[i].$().css("background-color", col);
rows[i].$().css("background-color", "");
if (geo_stack) {
var cmp = JSROOT.GEO.CompareStacks(geo_stack, this.getRowStack(rows[i]));
if (cmp > best_cmp) { best_cmp = cmp; best_indx = i; }
}
}
if (best_cmp > 0)
rows[best_indx].$().css("background-color", best_cmp == geo_stack.length ? "yellow" : "lightgrey");
},
/** Extract shapes from binary data using appropriate draw message
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment