<commit_before>define( [
            'dojo/_base/declare',
            'JBrowse/View/Track/BlockBased'
        ],
        function( declare, BlockBased ) {

return declare( BlockBased,
 /**
  * @lends JBrowse.View.Track.Sequence.prototype
  */
{

    /**
     * Track to display the underlying reference sequence, when zoomed in
     * far enough.
     *
     * @constructs
     * @extends JBrowse.View.Track.BlockBased
     */
    constructor: function( args ) {
        var config = args.config;
        var refSeq = args.refSeq;
        this.config = config;

        this.refSeq = refSeq;

        this.sequenceStore = args.store;
    },

    load: function() {
        window.setTimeout( dojo.hitch( this, 'setLoaded' ), 10 );
    },

    endZoom: function(destScale, destBlockBases) {
        this.clear();
        BlockBased.prototype.clear.apply(this);
    },

    setViewInfo:function(genomeView, heightUpdate, numBlocks,
                         trackDiv,
                         widthPct, widthPx, scale) {
        this.inherited( arguments );

        this.show();
    },

    nbsp: String.fromCharCode(160),

    fillBlock:function(blockIndex, block,
                       leftBlock, rightBlock,
                       leftBase, rightBase,
                       scale, stripeWidth,
                       containerStart, containerEnd) {

        var charSize = this.getCharacterMeasurements();

        // if we are zoomed in far enough to draw bases, then draw them
        if ( scale >= charSize.w ) {
            this.sequenceStore.getRange(
                this.refSeq, leftBase, rightBase,
                dojo.hitch( this, '_fillSequenceBlock', block, stripeWidth ) );
            this.heightUpdate( charSize.h*2, blockIndex );
        }
        // otherwise, just draw a sort of line (possibly dotted) that
        // suggests there are bases there if you zoom in far enough
        else {
            var borderWidth = Math.max(1,Math.round(4*scale/charSize.w));
            var blur = dojo.create( 'div', {
                             className: 'sequence_blur',
                             style: { borderStyle: 'solid', borderTopWidth: borderWidth+'px', borderBottomWidth: borderWidth+'px' }
                         }, block );
            this.heightUpdate( blur.offsetHeight+2*blur.offsetTop, blockIndex );
        }
    },

    _fillSequenceBlock: function( block, stripeWidth, start, end, seq ) {
        // fill with leading blanks if the
        // sequence does not extend all the way
        // across our range
        for( ; start < 0; start++ ) {<commit_msg>simplify Sequence track to rely more on base class implementation<commit_after>define( [
            'dojo/_base/declare',
            'JBrowse/View/Track/BlockBased'
        ],
        function( declare, BlockBased ) {

return declare( BlockBased,
 /**
  * @lends JBrowse.View.Track.Sequence.prototype
  */
{

    /**
     * Track to display the underlying reference sequence, when zoomed in
     * far enough.
     *
     * @constructs
     * @extends JBrowse.View.Track.BlockBased
     */
    constructor: function( args ) {},

    load: function() {
        window.setTimeout( dojo.hitch( this, 'setLoaded' ), 10 );
    },

    endZoom: function(destScale, destBlockBases) {
        this.clear();
        BlockBased.prototype.clear.apply(this);
    },

    setViewInfo:function(genomeView, heightUpdate, numBlocks,
                         trackDiv,
                         widthPct, widthPx, scale) {
        this.inherited( arguments );

        this.show();
    },

    nbsp: String.fromCharCode(160),

    fillBlock:function(blockIndex, block,
                       leftBlock, rightBlock,
                       leftBase, rightBase,
                       scale, stripeWidth,
                       containerStart, containerEnd) {

        var charSize = this.getCharacterMeasurements();

        // if we are zoomed in far enough to draw bases, then draw them
        if ( scale >= charSize.w ) {
            this.store.getRange(
                this.refSeq, leftBase, rightBase,
                dojo.hitch( this, '_fillSequenceBlock', block, stripeWidth ) );
            this.heightUpdate( charSize.h*2, blockIndex );
        }
        // otherwise, just draw a sort of line (possibly dotted) that
        // suggests there are bases there if you zoom in far enough
        else {
            var borderWidth = Math.max(1,Math.round(4*scale/charSize.w));
            var blur = dojo.create( 'div', {
                             className: 'sequence_blur',
                             style: { borderStyle: 'solid', borderTopWidth: borderWidth+'px', borderBottomWidth: borderWidth+'px' }
                         }, block );
            this.heightUpdate( blur.offsetHeight+2*blur.offsetTop, blockIndex );
        }
    },

    _fillSequenceBlock: function( block, stripeWidth, start, end, seq ) {
        // fill with leading blanks if the
        // sequence does not extend all the way
        // across our range
        for( ; start < 0; start++ ) {
{'fraction_non_alphanumeric': 0.10343466245558626, 'fraction_numerical': 0.0039478878799842085, 'mean_word_length': 1.808758314855876, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1864889', 'n_tokens_mistral': 1410, 'n_tokens_neox': 1337, 'n_words': 347}