Automatically find var names for brush selection

This commit is contained in:
Winston Chang
2015-04-27 17:04:07 -05:00
parent 2b227fcca5
commit 3f3c131737
4 changed files with 115 additions and 37 deletions

View File

@@ -413,13 +413,7 @@ imageutils.initCoordmap = function($el, coordmap) {
var coords = panel.scaleInv(offset);
// Add the panel (facet) variables, if present
if (panel.vars) {
var v;
for (var i=0; i<panel.vars.length; i++) {
v = panel.vars[i];
coords[v.name] = v.value;
}
}
$.extend(coords, panel.panel_vars);
// Add variable name mappings
coords.mapping = panel.mapping;
@@ -599,13 +593,7 @@ imageutils.createBrushHandler = function(inputId, $el, opts, coordmap) {
var panel = brush.getPanel();
// Add the panel (facet) variables, if present
if (panel.vars) {
var v;
for (var i=0; i<panel.vars.length; i++) {
v = panel.vars[i];
coords[v.name] = v.value;
}
}
$.extend(coords, panel.panel_vars);
// Add variable name mappings
coords.mapping = panel.mapping;