lib/js/app/stores/ExplorerStore.js
function _migrateFromFunnel(explorer, newModel) {
  if (explorer.query.steps.length < 1) return newModel;
  var activeStep = _.find(explorer.query.steps, { active: true }) || explorer.query.steps[0];

  _.each(SHARED_FUNNEL_STEP_PROPERTIES, function (key) {
    if (!_.isUndefined(activeStep[key])) {
      newModel.query[key] = activeStep[key];
    }
  });

  if (!_.isNull(activeStep.actor_property) && ExplorerUtils.shouldHaveTarget(newModel)) {
    newModel.query.target_property = activeStep.actor_property;
  }

  newModel.query.steps = [];

  return newModel;
}
function _migrateFromFunnel(explorer, newModel) {
  if (explorer.query.steps.length < 1) return newModel;
  var activeStep = _.find(explorer.query.steps, { active: true }) || explorer.query.steps[0];

  _.each(SHARED_FUNNEL_STEP_PROPERTIES, function (key) {
    if (!_.isUndefined(activeStep[key])) {
      newModel.query[key] = activeStep[key];
    }
  });

  if (!_.isNull(activeStep.actor_property) && ExplorerUtils.shouldHaveTarget(newModel)) {
    newModel.query.target_property = activeStep.actor_property;
  }

  newModel.query.steps = [];

  return newModel;
}
function _migrateFromFunnel ( explorer , newModel ) { if ( explorer . query . steps . length < 1 ) return newModel ; var activeStep = _ . find ( explorer . query . steps , { active : true } ) || explorer . query . steps [ 0 ] ; _ . each ( SHARED_FUNNEL_STEP_PROPERTIES , function ( key ) { if ( ! _ . isUndefined ( activeStep [ key ] ) ) { newModel . query [ key ] = activeStep [ key ] ; } } ) ; if ( ! _ . isNull ( activeStep . actor_property ) && ExplorerUtils . shouldHaveTarget ( newModel ) ) { newModel . query . target_property = activeStep . actor_property ; } newModel . query . steps = [ ] ; return newModel ; }
If the query got changed from a funnel, move the applicable parameters out to the root query
@param {Object} explorer The explorer model that is being updated
@param {Object} newModel The updated explorer model
@return {Object}         The new set of updates
If the query got changed from a funnel move the applicable parameters out to the root query