All files / src/stores MarkdownSelectionStore.js

100% Statements 8/8
100% Branches 0/0
100% Functions 3/3
100% Lines 8/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 204x 4x   4x   4x 4x       1x       2x       4x  
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;