src/build.js
/**
 * Return an array of beziers ids for the array of reaction ids.
 * @param {Object} reactions - A reactions object, e.g. a subset of
 * *escher.Map.reactions*.
 */
Return an array of beziers ids for the array of reaction ids.
@param {Object} reactions - A reactions object, e.g.
Return an array of beziers ids for the array of reaction ids . @param { Object } reactions - A reactions object e . g .
function bezier_ids_for_reaction_ids (reactions) {
  var bezier_ids = []
  for (var reaction_id in reactions) {
    var reaction = reactions[reaction_id]
    for (var segment_id in reaction.segments) {
      var segment = reaction.segments[segment_id]
      var bezs = [ 'b1', 'b2' ]
      bezs.forEach(function (bez) {
        var seg_bez = segment[bez]
        if (seg_bez !== null) {
          bezier_ids.push(bezier_id_for_segment_id(segment_id, bez))
        }
      })
    }
  }
  return bezier_ids
}
function bezier_ids_for_reaction_ids ( reactions ) { var bezier_ids = [ ] for ( var reaction_id in reactions ) { var reaction = reactions [ reaction_id ] for ( var segment_id in reaction . segments ) { var segment = reaction . segments [ segment_id ] var bezs = [ 'b1' , 'b2' ] bezs . forEach ( function ( bez ) { var seg_bez = segment [ bez ] if ( seg_bez !== null ) { bezier_ids . push ( bezier_id_for_segment_id ( segment_id , bez ) ) } } ) } } return bezier_ids }
Return an array of beziers ids for the array of reaction ids.
Return an array of beziers ids for the array of reaction ids .