All files / src/stores MarkdownSelectionStore.js

75% Statements 6/8
100% Branches 0/0
33.33% Functions 1/3
75% Lines 6/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 201x 1x   1x   1x 1x                       1x  
var Reflux = require('reflux');
var MarkdownSelectionActions = require('../actions/MarkdownSelectionActions');
 
var MarkdownSelectionStore = Reflux.createStore({
  init: function() {
    this.listenTo(MarkdownSelectionActions.selectionSet, this.handleSelectionSet);
    this.listenTo(MarkdownSelectionActions.selectionCleared, this.handleSelectionCleared);
  },
 
  handleSelectionCleared: function() {
    this.trigger({type: 'clear'});
  },
 
  handleSelectionSet: function() {
    this.trigger({type: 'set'});
  }
});
 
module.exports = MarkdownSelectionStore;