External module "metadata_track"
Variables
Let MetadataTrack
Metadata
Track: React.SFC<MetadataTrackProps> = observer((props) => {// Collect all generic metadata from every current interval.let generic_metadata: {[key: string]: any} =props.intervals.reduce((meta: {[key: string]: any}, {interval_set}: {interval_set: IntervalSet}) =>_.assign(meta, interval_set.to_list().reduce((meta: {[key: string]: any}, intvl: Interval) =>_.assign(meta, _.pickBy(intvl.data.metadata,(v) => v instanceof Metadata_Generic)), {})), {});let style = {width: props.width,height: props.height,display: _.keys(generic_metadata).length == 0 ? 'none' : 'block',};// console.log("props width", props.width);// console.log("style width", style.width);return <div className='metadata-track' style={style}>{_.keys(generic_metadata).map((k) => <div className='metadata-entry' key={k}><span className='metadata-key'>{k}:</span> <span className='metadata-value'>{JSON.stringify(generic_metadata[k].data)}</span></div>)}</div>;})