code: function(data) {
      const seq = data.model.get("seq");
      const selection = this._getSelection(data.model);
      // get the status of the upper and lower row
      const getNextPrev= this._getPrevNextSelection(data.model);
      const mPrevSel = getNextPrev[0];
      const mNextSel = getNextPrev[1];
  
      const boxWidth = this.g.zoomer.get("columnWidth");
      const boxHeight = this.g.zoomer.get("rowHeight");
  
      // avoid unnecessary loops
      if (selection.length === 0) { return; }
  
      let hiddenOffset = 0;
      return (() => {
        const result = [];
        const end = seq.length - 1;
        for (let n = 0; n <= end; n++) {
          result.push((() => {
            if (data.hidden.indexOf(n) >= 0) {
              return hiddenOffset++;
            } else {
              const k = n - hiddenOffset;
              // only if its a new selection
              if (selection.indexOf(n) >= 0 && (k === 0 || selection.indexOf(n - 1) < 0 )) {
                return this._renderSelection({n:n,
                                             k:k,
                                             selection: selection,
                                             mPrevSel: mPrevSel,
                                             mNextSel:mNextSel,
                                             xZero: data.xZero,
                                             yZero: data.yZero,
                                             model: data.model});
              }
            }
          })());
        }
        return result;
      })();
    }
docs: loops over all selection and calls the render method