js/hicBrowser.js
/**
     * Update the maps and tracks.  This method can be called from the browser event thread repeatedly, for example
     * while mouse dragging.  If called while an update is in progress queue the event for processing later.  It
     * is only neccessary to queue the most recent recently received event, so a simple instance variable will suffice
     * for the queue.
     *
     * @param event
     */
Update the maps and tracks.  This method can be called from the browser event thread repeatedly, for example
while mouse dragging.  If called while an update is in progress queue the event for processing later.  It
is only neccessary to queue the most recent recently received event, so a simple instance variable will suffice
for the queue.

@param event
Update the maps and tracks . This method can be called from the browser event thread repeatedly for example while mouse dragging . If called while an update is in progress queue the event for processing later . It is only neccessary to queue the most recent recently received event so a simple instance variable will suffice for the queue . @param event
async update(event) {
        if (this.updating) {
            const type = event ? event.type : "NONE";
            this.pending.set(type, event);
        } else {
            this.updating = true;
            try {
                this.startSpinner();
                if (event !== undefined && "LocusChange" === event.type) {
                    this.layoutController.xAxisRuler.locusChange(event);
                    this.layoutController.yAxisRuler.locusChange(event);
                }
                const promises = []
                for (let xyTrackRenderPair of this.trackPairs) {
                    promises.push(this.renderTrackXY(xyTrackRenderPair));
                }
                promises.push(this.contactMatrixView.update(event));
                await Promise.all(promises);
                if (event && event.propogate) {
                    let syncState1 = this.getSyncState();
                    for (let browser of this.synchedBrowsers) {
                        browser.syncState(syncState1);
                    }
                }
            } finally {
                this.updating = false;
                if (this.pending.size > 0) {
                    const events = []
                    for (let [k, v] of this.pending) {
                        events.push(v);
                    }
                    this.pending.clear();
                    for (let e of events) {
                        this.update(e)
                    }
                }
                if (event) {
                    this.eventBus.post(event)
                }
                this.stopSpinner();
            }
        }
    }
async update ( event ) { if ( this . updating ) { const type = event ? event . type : "NONE" ; this . pending . set ( type , event ) ; } else { this . updating = true ; try { this . startSpinner ( ) ; if ( event !== undefined && "LocusChange" === event . type ) { this . layoutController . xAxisRuler . locusChange ( event ) ; this . layoutController . yAxisRuler . locusChange ( event ) ; } const promises = [ ] for ( let xyTrackRenderPair of this . trackPairs ) { promises . push ( this . renderTrackXY ( xyTrackRenderPair ) ) ; } promises . push ( this . contactMatrixView . update ( event ) ) ; await Promise . all ( promises ) ; if ( event && event . propogate ) { let syncState1 = this . getSyncState ( ) ; for ( let browser of this . synchedBrowsers ) { browser . syncState ( syncState1 ) ; } } } finally { this . updating = false ; if ( this . pending . size > 0 ) { const events = [ ] for ( let [ k , v ] of this . pending ) { events . push ( v ) ; } this . pending . clear ( ) ; for ( let e of events ) { this . update ( e ) } } if ( event ) { this . eventBus . post ( event ) } this . stopSpinner ( ) ; } } }
Update the maps and tracks.
Update the maps and tracks .
// possibly, unless update was called from an event post (infinite loop)