function nodeDetailsStore() {
  var api = {
    getSelectedNode: getSelectedNode
  };

  var currentNodeId, degreeVisible = false,
      currentConnectionType;

  appEvents.selectNode.on(updateDetails);
  appEvents.showDegree.on(updateDegreeDetails);

  eventify(api);

  return api;

  function updateDetails(nodeId) {
    currentNodeId = nodeId;
    updateDegreeDetails(currentNodeId, currentConnectionType);
  }

  function updateDegreeDetails(id, connectionType) {
    currentNodeId = id;

    degreeVisible = currentNodeId !== undefined;
    if (degreeVisible) {
      currentConnectionType = connectionType;
      var rootInfo = scene.getNodeInfo(id);
      var conenctions = scene.getConnected(id, connectionType);

      var viewModel = new DegreeWindowViewModel(rootInfo.name, conenctions, connectionType, id);

      appEvents.showNodeListWindow.fire(viewModel, 'degree');
    } else {
      appEvents.hideNodeListWindow.fire('degree');
    }
    api.fire('changed');
  }

  function getSelectedNode() {
    if (currentNodeId === undefined) return;

    return getBaseNodeViewModel(currentNodeId);
  }
}
Prepares data for selected node details