How to use the ve-sequence-utils.annotationTypes.forEach function in ve-sequence-utils

To help you get started, we’ve selected a few ve-sequence-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TeselaGen / openVectorEditor / src / commands / index.js View on Github external
handler: props => {
      annotationTypes.forEach(type => {
        props.annotationVisibilityShow(type);
      });
    }
  },
github TeselaGen / openVectorEditor / src / utils / prepareRowData.js View on Github external
bpsPerRow
    );
  });

  for (let rowNumber = 0; rowNumber < totalRows; rowNumber++) {
    const row = {};
    row.rowNumber = rowNumber;
    row.start = rowNumber * bpsPerRow;
    row.end =
      (rowNumber + 1) * bpsPerRow - 1 < sequenceLength
        ? (rowNumber + 1) * bpsPerRow - 1
        : sequenceLength - 1;
    if (row.end < 0) {
      row.end = 0;
    }
    annotationTypes.forEach(function(type) {
      row[type] = rowMap[type][rowNumber] || [];
    });
    row.sequence = sequenceData.noSequence
      ? {
          length: row.end + 1 - row.start
        }
      : sequenceData.sequence.slice(row.start, row.end + 1);

    rows[rowNumber] = row;
  }
  return rows;
}