NLeSC/PattyVis

Search results box

Closed this issue · 4 comments

  • Implement the Search results box from #4
  • Make it context sensitive so that when we are in orbital camera mode, it can show the different view options for the currently orbited object.

Handig is angular:

HTML:

<div ng-controller="SearchCtrl">
  <li ng-repeat="site in data.sites | orderBy:'site.name'">
    <a ng-click=selectSite(site)>{{site.name}}</a>
  </li>
</div>

JS

var SearchCtrl = [ '$scope', '$http', function($scope, $http) {
  $scope.sites = {
    "name" : {},
    "stuff" : []
  };

  // load JSON data
  $http.get('sites.json').then(function(res) {
    $scope.sites = res.data;
  });

  $scope.selectSite = function(item) {
  }
}

Implemented search on data/sites.json in dda30be

what is the connection of view options with with search results?
what are different view options?

It is now context sensitive and awesome.